スクロール バーの表示と非表示
Contents
[
Hide
]
スクロール バーは、幅が広く奥行きのある、つまり多数の行と列があるスプレッドシートの内容をナビゲートする場合に便利です。ほとんどのアプリケーションは、次の 2 種類のスクロール バーをサポートしています。
- 垂直スクロール バー
- 横スクロールバー
これらはどちらも Microsoft Excel にあります。
Aspose.Cell の GridDesktop API は、ワークシートの内容をスクロールするための水平および垂直スクロール バーを提供します。 Aspose.Cells.GridDesktop API を使用すると、開発者はこれら両方のスクロール バーの表示を制御できます。
スクロール バーの表示の制御
GridDesktop でスクロール バーの可視性を制御するには、IsVerticalScrollBarVisible および IsHorizontalScrollBarVisible プロパティを使用します。以下の例は、スクロール バーを非表示および表示する方法を示しています。
プログラミング サンプル: スクロール バーの非表示
スクロールバーを非表示にするには、可視性を制御するプロパティを false に設定します。
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 | |
// Hiding the vertical scroll bar | |
gridDesktop1.IsVerticalScrollBarVisible = false; | |
// Hiding the horizontal scroll bar | |
gridDesktop1.IsHorizontalScrollBarVisible = false; |
プログラミング サンプル: スクロール バーを表示する
スクロールバーを表示するには、表示を制御するプロパティを true に設定します。
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 | |
// Displaying the vertical scroll bar | |
gridDesktop1.IsVerticalScrollBarVisible = true; | |
// Displaying the horizontal scroll bar | |
gridDesktop1.IsHorizontalScrollBarVisible = true; |