PrintDocument for WinForms
GetVectorSize メソッド (TableVectorCollection)


C1.PrintDocument.6 アセンブリ > C1.C1Preview 名前空間 > TableVectorCollection クラス : GetVectorSize メソッド
The 0-based index (TableVector.Ordinal) of the row or column.
Returns the size (height for rows, width for columns) of a TableVector (row or column) identified by its index in a RenderTable. This method does not create the specified vector if it has not been initialized (see remarks for details).
シンタックス
'宣言
 
Public Function GetVectorSize( _
   ByVal index As System.Integer _
) As LengthBase
'使用法
 
Dim instance As TableVectorCollection
Dim index As System.Integer
Dim value As LengthBase
 
value = instance.GetVectorSize(index)
public LengthBase GetVectorSize( 
   System.int index
)

パラメータ

index
The 0-based index (TableVector.Ordinal) of the row or column.

戻り値の型

The height or width of the row or column.
解説

Because elements of a RenderTable's collections (cells, rows and columns) are physically created "on demand" only when they are accessed via collections' indexer properties, using this method is more efficient when you only need to test the height/width of a row/column without creating it.

For instance, the following code physically creates a TableRow object before testing its height:

RenderTable rt = new RenderTable(); if (rt.Rows[10].Height == Unit.Auto) doSomething(); At the same time, the following code does not cause a physical row object to be created, while being functionally identical to the code above: RenderTable rt = new RenderTable(); if (rt.Rows.GetVectorSize(10) == Unit.Auto) doSomething();
参照

TableVectorCollection クラス
TableVectorCollection メンバ