'
' たとえば、各種Enum Controlsを例証します
'
set oCustomProperty = ActiveSceneRoot.AddProperty( "CustomProperty", false, "EnumControls" )
'カスタムパラメータを作成し、デフォルト値を設定します
oCustomProperty.AddParameter3 "MyCombo", siString, "Yellow"
oCustomProperty.AddParameter3 "MyBitField", siUByte, 68
oCustomProperty.AddParameter3 "MyRadio", siInt4
oCustomProperty.AddParameter3 "NotShown", siInt4
'レイアウトを定義します
set oLayout = oCustomProperty.PPGLayout
'コンボボックスではラベルと値は同じにします
'これは、実際にはユーザがパラメータ値として選択する文字列を
'設定するためです
dim aComboItems, aBitfieldItems, aRadioItems
aComboItems = Array( "Orange", "Orange", _
"Yellow", "Yellow", _
"Apple", "Apple" )
oLayout.AddEnumControl "MyCombo", aComboItems, "Things", siControlCombo
' ビットフィールドの値は、通常は2の累乗にします
' 値の順番は任意です
aBitfieldItems = Array( "Bit 0", 1, _
"Bit 6", 64, _
"Bit 2", 4, _
"Bit 7", 128 )
oLayout.AddEnumControl "MyBitField", aBitfieldItems, , siControlCheck
' ユーザオプションの数が少ない場合は、コンボボックスではなく
' ラジオボタンを使用する方法もお勧めします
aRadioItems = Array( "Slow", 0, _
"Fast", 1 )
oLayout.AddEnumControl "MyRadio", aRadioItems, , siControlRadio
InspectObj oCustomProperty
' たとえば、各種Enum Controlsを例証します
'
set oCustomProperty = ActiveSceneRoot.AddProperty( "CustomProperty", false, "EnumControls" )
'カスタムパラメータを作成し、デフォルト値を設定します
oCustomProperty.AddParameter3 "MyCombo", siString, "Yellow"
oCustomProperty.AddParameter3 "MyBitField", siUByte, 68
oCustomProperty.AddParameter3 "MyRadio", siInt4
oCustomProperty.AddParameter3 "NotShown", siInt4
'レイアウトを定義します
set oLayout = oCustomProperty.PPGLayout
'コンボボックスではラベルと値は同じにします
'これは、実際にはユーザがパラメータ値として選択する文字列を
'設定するためです
dim aComboItems, aBitfieldItems, aRadioItems
aComboItems = Array( "Orange", "Orange", _
"Yellow", "Yellow", _
"Apple", "Apple" )
oLayout.AddEnumControl "MyCombo", aComboItems, "Things", siControlCombo
' ビットフィールドの値は、通常は2の累乗にします
' 値の順番は任意です
aBitfieldItems = Array( "Bit 0", 1, _
"Bit 6", 64, _
"Bit 2", 4, _
"Bit 7", 128 )
oLayout.AddEnumControl "MyBitField", aBitfieldItems, , siControlCheck
' ユーザオプションの数が少ない場合は、コンボボックスではなく
' ラジオボタンを使用する方法もお勧めします
aRadioItems = Array( "Slow", 0, _
"Fast", 1 )
oLayout.AddEnumControl "MyRadio", aRadioItems, , siControlRadio
InspectObj oCustomProperty