GridWeb およびそのヘッダーバーのリサイズ

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

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

以下のコードスニペットの出力は以下のようになります。

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

todo:image_alt_text

// 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:image_alt_text

GridWebコントロールのHeaderBarHeightとHeaderBarWidthプロパティを使用して、上部ヘッダーバーの高さと左側ヘッダーバーの幅を変更します。以下のコード例の出力は以下のようになります。

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

todo:image_alt_text

// 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);