MESCIUS SPREAD for Windows Forms 15.0J
PreferredSizeRowOptions 列挙体
使用例 使用例 

行の最適な高さを取得するときのオプションを指定します。
構文
'宣言
 
Public Enum PreferredSizeRowOptions 
   Inherits System.Enum
public enum PreferredSizeRowOptions : System.Enum 
メンバ
メンバ解説
ExcludeHeadersヘッダを無視することを指定します。
ExcludeSpansセル結合を無視することを指定します。
IncludeAllすべての自動サイズ調整オプションを含めることを指定します。
Off行の高さの自動サイズ調整オプションをオフにすることを指定します。
使用例
次のサンプルコードは、PreferredSizeRowOptions列挙体を使用します。
fpSpread1.ActiveSheet.ColumnHeader.Cells[0,2].Text = "Column Header Text";
fpSpread1.ActiveSheet.Cells[1, 1].Text = "Text in cell (1, 1)";
FarPoint.Win.Spread.CellType.TextCellType textcell = new FarPoint.Win.Spread.CellType.TextCellType();
textcell.WordWrap = true;
fpSpread1.ActiveSheet.Cells[2, 2].CellType = textcell;
fpSpread1.ActiveSheet.Cells[2, 2].Text = "Spread Windows Forms and the Funnel Chart";
fpSpread1.AutoFitColumnOptions = FarPoint.Win.Spread.PreferredSizeColumnOptions.ExcludeHeaders | FarPoint.Win.Spread.PreferredSizeColumnOptions.ExcludeSpans;
fpSpread1.AutoFitRowOptions = FarPoint.Win.Spread.PreferredSizeRowOptions.ExcludeHeaders;

private void button1_Click(object sender, EventArgs e)
        {
float size;
size = fpSpread1.ActiveSheet.GetPreferredColumnWidth(2, FarPoint.Win.Spread.PreferredSizeColumnOptions.ExcludeHeaders | FarPoint.Win.Spread.PreferredSizeColumnOptions.ExcludeSpans);
textBox1.Text = size.ToString();
        }
FpSpread1.ActiveSheet.ColumnHeader.Cells(0, 2).Text = "Column Header Text"
FpSpread1.ActiveSheet.Cells(1, 1).Text = "Text in cell (1, 1)"
Dim textcell As New FarPoint.Win.Spread.CellType.TextCellType()
textcell.WordWrap = True
FpSpread1.ActiveSheet.Cells(2, 2).CellType = textcell
FpSpread1.ActiveSheet.Cells(2, 2).Text = "Spread Windows Forms and the Funnel Chart"
FpSpread1.AutoFitColumnOptions = FarPoint.Win.Spread.PreferredSizeColumnOptions.ExcludeHeaders Or FarPoint.Win.Spread.PreferredSizeColumnOptions.ExcludeSpans
FpSpread1.AutoFitRowOptions = FarPoint.Win.Spread.PreferredSizeRowOptions.ExcludeHeaders

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim size As Integer
size = FpSpread1.ActiveSheet.GetPreferredRowHeight(2, FarPoint.Win.Spread.PreferredSizeRowOptions.ExcludeHeaders)
TextBox1.Text = size
End Sub
継承階層

System.Object
   System.ValueType
      System.Enum
         FarPoint.Win.Spread.PreferredSizeRowOptions

参照

FarPoint.Win.Spread 名前空間

 

 


© MESCIUS inc. All rights reserved.