
GridData コントロールには、行および列のグリッドとしての 2 次元データ配列がオプションのラベルと一緒に表示されます。 これらは、GridData または GridData 型の基本パラメータに関連付けられています。
これらを作成するには、PPGLayout.AddItem または PPGLayout::AddItem メソッドを、siControlGrid コントロール タイプ列挙型とともに使用します。
// ** during parameter definition (for example, in the Define callback) **
// use the convenience method to add the grid to the custom property
var oParam = oPSet.AddGridParameter( "MyGrid" );
// now to get the actual grid from the parameter, use [Get]Value (not [Get]Source)
var oGrid = oParam.Value;
oGrid.BeginEdit();
oGrid.RowCount = 4;
oGrid.ColumnCount = 4;
oGrid.SetRowValues( 0, new Array(0, 0.5, 0.75, 0.1) );
oGrid.SetRowValues( 1, new Array(0.1, 0.5, 0.75, 0.1) );
oGrid.SetRowValues( 2, new Array(0.2, 0.99, 0.75, 0.1) );
oGrid.SetRowValues( 3, new Array(0.3, 0.5, 0.75, 0.1) );
var aCols = new Array( "R", "G", "B", "A" );
for ( var i=0; i<4; i++ ) {
oGrid.SetRowLabel( i, "Vertex "+i );
oGrid.SetColumnLabel( i, aCols[i] );
}
oGrid.EndEdit();
// ** during control creation (for example, in the DefineLayout callback) **
// no convenience method for the grid control
oLayout.AddItem( "MyGrid", "", siControlGrid );//oItem.SetAttribute(siDecimals, 0 );基本は、GridData または GridData パラメータは、GridData または GridData オブジェクトの実際のインスタンスです。そのため、利用できるすべてのメソッドとプロパティは GridData または GridData 次を使用して Logic 経由で動的に使用できます。Parameter.Value(PPG.Inspected から)を使用して Logic を介して動的に使用できます。これは ProjectItemCollection を返し、これを使用して特定の項目のパラメータを入手して GridData または GridData オブジェクトにポインタを取得します(「カスタム プロパティを動的に変更する」を参照)。
グリッド コントロールの操作方法については、GridData または GridData オブジェクトのために、ドキュメントに記載されているオブジェクトのサンプルを確認してください。