MESCIUS SPREAD for Windows Forms 15.0J
EditorValue プロパティ (GcComboBoxCellType)
使用例 

基になるデータモデルにどの値が書き込まれるかを取得または設定します。
構文
'宣言
 
Public Property EditorValue As GcComboBoxEditorValue
public GcComboBoxEditorValue EditorValue {get; set;}
使用例
次のサンプルコードは、EditorValueプロパティを設定します。
GrapeCity.Win.Spread.InputMan.CellType.GcComboBoxCellType gccombo = new GrapeCity.Win.Spread.InputMan.CellType.GcComboBoxCellType();
gccombo.Items.AddRange(new string[] { "Feta", "Havarti", "Swiss" });
gccombo.Items[0].BackColor = Color.Beige;
gccombo.Items[1].BackColor = Color.Cornsilk;
gccombo.Items[2].BackColor = Color.PeachPuff;
gccombo.EditorValue = GrapeCity.Win.Spread.InputMan.CellType.GcComboBoxEditorValue.Index;
fpSpread1.Sheets[0].Cells[1, 1].CellType = gccombo;
fpSpread1.Sheets[0].Columns[1].Width = 200;
fpSpread1.Sheets[0].Rows[1].Height = 40;

private void button1_Click(object sender, EventArgs e)
        {
textBox1.Text = fpSpread1.Sheets[0].Cells[1, 1].Value.ToString();
        }
Dim gccombo As New GrapeCity.Win.Spread.InputMan.CellType.GcComboBoxCellType()
gccombo.Items.AddRange(New String() {"Feta", "Havarti", "Swiss"})
gccombo.Items(0).BackColor = Color.Beige
gccombo.Items(1).BackColor = Color.Cornsilk
gccombo.Items(2).BackColor = Color.PeachPuff
gccombo.EditorValue = GrapeCity.Win.Spread.InputMan.CellType.GcComboBoxEditorValue.Index
fpSpread1.Sheets(0).Cells(1, 1).CellType = gccombo
fpSpread1.Sheets(0).Columns(1).Width = 200
fpSpread1.Sheets(0).Rows(1).Height = 40

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        TextBox1.Text = fpSpread1.Sheets(0).Cells(1, 1).Value.ToString()
 End Sub
参照

GcComboBoxCellType クラス
GcComboBoxCellType メンバ

 

 


© MESCIUS inc. All rights reserved.