FlexPivot for WinForms
UpdateSize メソッド
使用例 

C1.Win.C1FlexGrid.4.5.2 アセンブリ > C1.Win.C1FlexGrid 名前空間 > IC1FlexGridRowDetail インターフェース : UpdateSize メソッド
FlexGrid which displays detail control.
Index of parent detail row.
The proposed size for the detail control.
Used to update size of the control.
シンタックス
'宣言
 
Sub UpdateSize( _
   ByVal parentGrid As C1FlexGrid, _
   ByVal rowIndex As System.Integer, _
   ByVal proposedSize As System.Drawing.Size _
) 
void UpdateSize( 
   C1FlexGrid parentGrid,
   System.int rowIndex,
   System.Drawing.Size proposedSize
)

パラメータ

parentGrid
FlexGrid which displays detail control.
rowIndex
Index of parent detail row.
proposedSize
The proposed size for the detail control.
解説

The detail control should update its size in this method.

Height of the detail row will be adjusted based on the height of the control.

The easiest way to update size is to assign value of proposedSize parameter. The width of proposed size is the width of all cells from first non-fixed to last. The height of proposed size is the current height of the control.

使用例
The code below shows the implementation of UpdateSize method using proposedSize parameter: The code below shows the basic implementation of UpdateSize method for detail control derived from C1Label:
void IC1FlexGridRowDetail.UpdateSize(C1FlexGrid parentGrid, int rowIndex, Size proposedSize)
{ 
    // assign proposedSize as control's size
    Size = proposedSize; 
}
void IC1FlexGridRowDetail.UpdateSize(C1FlexGrid parentGrid, int rowIndex, Size proposedSize)
{ 
    // accuire size of partent grid's scrollable area
    var srSz = parentGrid.ScrollableRectangle.Size; 
    
    // measure the size of C1Label's text, which fits into parent's grid scrollable area width
    var sz = TextRenderer.MeasureText(Text, Font, srSz, TextFormatFlags.WordBreak);
    
    // chose the maximum width between scrollable area and measured text
    sz.Width = Math.Max(sz.Width, srSz.Width); 
    
    // assign calculated size as control's size
    Size = sz;
}
参照

IC1FlexGridRowDetail インターフェース
IC1FlexGridRowDetail メンバ