GridWeb とそのヘッダー バーのサイズを変更する

Aspose.Cells.GridWeb の幅と高さを変更する

Aspose.Cells.GridWeb コントロールの幅と高さを変更することは、単純ですが重要な機能です。 Aspose.Cells.GridWeb コントロールは、API の GridWeb クラスによって表されます。GridWeb コントロールの幅と高さを変更するには、幅と高さのプロパティを使用します。

次のコード スニペットの出力を以下に示します。

GridWeb コントロールの幅と高さを変更

todo:画像_代替_文章

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Setting the height of GridWeb control
GridWeb1.Height = new Unit(200, UnitType.Point);
// Setting the width of GridWeb control
GridWeb1.Width = new Unit(520, UnitType.Point);

ヘッダーバーの幅と高さを変更する

Aspose.Cells.GridWeb コントロールには、次の 2 つのヘッダー バーが含まれています。

  • 上部のヘッダー バー。このヘッダー バーは列を A 、 B 、 C 、 D などとして表します。
  • 左のヘッダー バー。このヘッダー バーは行を 1 、 2 、 3 、 4 などとして表します。

これらのヘッダー バーの両方を以下に示します。

ヘッダーバー

todo:画像_代替_文章

GridWeb コントロールの HeaderBarHeight プロパティと HeaderBarWidth プロパティをそれぞれ使用して、上部のヘッダー バーの高さと左側のヘッダー バーの幅を変更します。次の図は、次のコード例の出力を示しています。

ヘッダーバーの幅と高さを変更

todo:画像_代替_文章

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Setting the height of header bar
GridWeb1.HeaderBarHeight = new Unit(35, UnitType.Point);
// Setting the width of header bar
GridWeb1.HeaderBarWidth = new Unit(50, UnitType.Point);