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

C1.Win.4.8 アセンブリ > C1.Win.C1SuperTooltip 名前空間 > C1SuperLabelBase クラス > Measure メソッド : Measure() メソッド
Measures the width and height of the control content.
シンタックス
'宣言
 
Public Overloads Function Measure() As Size
public Size Measure()

戻り値の型

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

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