Ribbon for WinForms
Measure(Int32) メソッド
使用例 

C1.Win.4.8 アセンブリ > C1.Win.C1SuperTooltip 名前空間 > C1SuperLabelBase クラス > Measure メソッド : Measure(Int32) メソッド
Width used to calculate word-wrapping.
Measures the height of the control content when rendered with a given width.
シンタックス
'宣言
 
Public Overloads Function Measure( _
   ByVal width As Integer _
) As Size
public Size Measure( 
   int width
)

パラメータ

width
Width used to calculate word-wrapping.

戻り値の型

System.Drawing.Size object that represents the size of the content, in pixels.
使用例
The code below scans all the columns in a C1FlexGrid and calculates the height needed to display the cell with the tallest content:
int GetMaximumCellHeight(int row)
{
  // maximum height is unknown
  int maxHeight = -1;
            
  // scan all columns to find the tallest content
  for (int col = 0; col < _flex.Cols.Count; col++)
  {
    // get cell content
    string text = _flex.GetDataDisplay(row, col);
            
    // check that the cell contains html
    if (!string.IsNullOrEmpty(text) &&
         text.StartsWith("<html>"))
    {
      // measure height needed to render the Html
      _superLabel.Text = text;
      int width = _flex.Cols[col].WidthDisplay;
      int height = _superLabel.Measure(width).Height;
            
      // save maximum height
      if (height > maxHeight)
        maxHeight = height;
  }
  return maxHeight;
}
参照

C1SuperLabelBase クラス
C1SuperLabelBase メンバ
オーバーロード一覧