PowerTools MultiRow for Windows Forms 8.0J
CreateGridTemplate(Int32,Int32,Int32) メソッド
使用例 

列数を示すSystem.Int32
Rowセクション内のセルの幅を示すSystem.Int32
Rowセクション内のセルの高さを示すSystem.Int32
指定した列数とセルのサイズを使用して、標準の行列Templateを作成します。
構文
Public Overloads Shared Function CreateGridTemplate( _
   ByVal columnCount As Integer, _
   ByVal cellWidth As Integer, _
   ByVal cellHeight As Integer _
) As Template
public static Template CreateGridTemplate( 
   int columnCount,
   int cellWidth,
   int cellHeight
)

パラメータ

columnCount
列数を示すSystem.Int32
cellWidth
Rowセクション内のセルの幅を示すSystem.Int32
cellHeight
Rowセクション内のセルの高さを示すSystem.Int32

戻り値の型

標準の行列Templateを表すTemplate
例外
例外解説
System.ArgumentOutOfRangeException

columnCount0以下です。

または

cellWidth0以下です。

または

cellHeight0以下です。

解説
CreateGridTemplate(Int32)メソッドに基づき、cellWidthcellHeightを使用して既定のTextBoxCellの初期サイズを変更できます。このサイズは、ColumnHeaderCellの幅とRowHeaderCellの高さにも適用されます。
使用例
次のサンプルコードは、このメソッドを使用してグリッド状のテンプレートを作成する方法を示します。このサンプルコードは、CreateGridTemplate(int)に示されている詳細なコード例の一部を抜粋したものです。
void setSecond_Click(object sender, EventArgs e)
{
    Template template1 = Template.CreateGridTemplate(5, 100, 25);
    this.gcMultiRow1.Template = template1;
}
Private Sub setSecond_Click(ByVal sender As Object, ByVal e As EventArgs) Handles setSecond.Click
    Dim template1 As Template = Template.CreateGridTemplate(5, 100, 25)
    Me.gcMultiRow1.Template = template1
End Sub
参照

Template クラス
Template メンバ
オーバーロード一覧
CreateGridTemplate(Int32) メソッド
CreateGridTemplate(Int32,Int32,Int32,Int32) メソッド
CreateGridTemplate(Int32,Int32,Int32,Int32,AutoGenerateGridTemplateStyles) メソッド
CreateGridTemplate(Int32,Int32,Int32,Int32,AutoGenerateGridTemplateStyles,Int32) メソッド
CreateGridTemplate(IEnumerable<Cell>) メソッド
CreateGridTemplate(IEnumerable<Cell>,Int32) メソッド
CreateGridTemplate(IEnumerable<Cell>,Int32,AutoGenerateGridTemplateStyles) メソッド
CreateGridTemplate(IEnumerable<Cell>,Int32,AutoGenerateGridTemplateStyles,Int32) メソッド

 

 


© 2008-2015 GrapeCity inc. All rights reserved.