フォーマット ペインターの使用
Contents
[
Hide
]
書式ペインタは、Aspose.Cells.GridDesktop で採用された MS Excel の機能です。とてもいい機能です。この機能をまだ使用していない人のために、フォーマット ペインターを使用すると、ユーザーはフォーカスされたセルの書式設定を別のセルに適用できます。この機能の実装は非常に簡単です。このトピックでは、それについても説明します。
フォーマット ペインターの使用
の特徴フォーマットペインター書式設定を他のセルに適用するセルを選択してから呼び出す必要があります。StartFormatPainter方法グリッドデスクトップ.フォーマット ペインターには、次の 2 つのモードがあります。
- Format Painter を 1 回使用する
- Format Painter を常に使用する
Format Painter を 1 回使用する
開発者がフォーマット ペインターの機能を 1 回だけ使用して、フォーカスされたセルの書式設定を 1 つのセルに適用したい場合は、呼び出して実行できます。StartFormatPainterメソッドと渡す間違いそれに値します。この間違い値は、フォーマット ペインターによる描画を永久に禁止します。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// Starting format painter to paint once | |
gridDesktop1.StartFormatPainter(false); |
Format Painter を常に使用する
複数のセルに書式設定を適用する必要がある場合、常に書式ペインタを使用することは便利な機能です。開発者は、単に呼び出すだけでこの機能を実現できます。StartFormatPainterメソッドと渡す真実それに値します。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// Starting format painter to keep painting forever | |
gridDesktop1.StartFormatPainter(true); |
この種のフォーマット ペインターは、私たちが止めない限り永遠に絵を描き続けます。したがって、フォーマットペインターが常にペイントするのを止めるには、単に呼び出すことができますEndFormatPainter方法グリッドデスクトップ.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// Ending format painter to stop painting | |
gridDesktop1.EndFormatPainter(); |