セル型ごとの設定を参照するには?
対象製品
El Tabelle for .NET 2.0J
詳細
El Tabelle では、各セルにセル型を設定することができます。
[Visual Basic]
[C#]
このようにして設定したセル型ごとの設定を参照するには、使用するセル型で型の変換(キャスト)を行います。
[Visual Basic]
[C#]
[Visual Basic]
Imports GrapeCity.Win.ElTabelle
Imports GrapeCity.Win.ElTabelle.Editors
Dim objNumberEditor As NumberEditor
objNumberEditor = New NumberEditor
objNumberEditor.ShowSpin = Visibility.ShowAlways
Sheet1(0, 0).Editor = objNumberEditor
Imports GrapeCity.Win.ElTabelle.Editors
Dim objNumberEditor As NumberEditor
objNumberEditor = New NumberEditor
objNumberEditor.ShowSpin = Visibility.ShowAlways
Sheet1(0, 0).Editor = objNumberEditor
[C#]
using GrapeCity.Win.ElTabelle;
using GrapeCity.Win.ElTabelle.Editors;
NumberEditor objNumberEditor = new NumberEditor();
objNumberEditor.ShowSpin = Visibility.ShowAlways;
sheet1[0, 0].Editor = objNumberEditor;
using GrapeCity.Win.ElTabelle.Editors;
NumberEditor objNumberEditor = new NumberEditor();
objNumberEditor.ShowSpin = Visibility.ShowAlways;
sheet1[0, 0].Editor = objNumberEditor;
このようにして設定したセル型ごとの設定を参照するには、使用するセル型で型の変換(キャスト)を行います。
[Visual Basic]
Imports GrapeCity.Win.ElTabelle
Imports GrapeCity.Win.ElTabelle.Editors
Dim objNumberEditor As NumberEditor
objNumberEditor = CType(Sheet1(0, 0).Editor, NumberEditor)
objNumberEditor.ShowSpin = Visibility.NotShown
Sheet1(0, 0).Editor = objNumberEditor
Imports GrapeCity.Win.ElTabelle.Editors
Dim objNumberEditor As NumberEditor
objNumberEditor = CType(Sheet1(0, 0).Editor, NumberEditor)
objNumberEditor.ShowSpin = Visibility.NotShown
Sheet1(0, 0).Editor = objNumberEditor
[C#]
using GrapeCity.Win.ElTabelle;
using GrapeCity.Win.ElTabelle.Editors;
NumberEditor objNumberEditor;
objNumberEditor = (NumberEditor)Sheet1(0, 0).Editor;
objNumberEditor.ShowSpin = Visibility.NotShown;
sheet1[0, 0].Editor = objNumberEditor;
using GrapeCity.Win.ElTabelle.Editors;
NumberEditor objNumberEditor;
objNumberEditor = (NumberEditor)Sheet1(0, 0).Editor;
objNumberEditor.ShowSpin = Visibility.NotShown;
sheet1[0, 0].Editor = objNumberEditor;
キーワード
HowTo
この文書は、以前は次のFAQ IDで公開されていました : 5196