|
選択タイプの設定で、選択可能な値を表す DtoSelectionItem オブジェクトのコレクション。
DtoSetting オブジェクトの AllPossibleSelections プロパティは、DtoSelectionItems コレクションを返します。
Count プロパティを使用してコレクション内のメンバー数を調べます。
Set first_setting = my_settings(1) type = first_setting.Type '選択タイプの設定の場合のみこれを呼び出す '設定タイプ列挙を参照 if (type = dtoSingleSel) OR (type = dtoMultiSel) Set all_the_selections = first_setting.AllPossibleSelections
DtoCategories コレクション
DtoSetting オブジェクト
DtoSelectionItems コレクションに項目を追加します。
result
|
メソッド呼び出しの結果を示す DtoResult(Long 型の値)。DtoSession オブジェクトの Error プロパティを使って結果の説明を取得します。
|
このメソッドには DtoSelectionItem タイプのパラメーターが必要です。このため、コレクションにオブジェクトを追加する前に、まずオブジェクトのインスタンスを作成してそのプロパティを設定する必要があります。
Dim Result As dtoResult Dim Session As New DtoSession Result = Session.Connect("nik-ntws", "", "") Dim my_setting As DtoSetting Dim SetID As Long SetID = 26 Set my_setting = Session.GetSetting(SetID) If my_setting Is Nothing Then MsgBox " Setting is wrong" Exit Sub End If '新しい値の割り当てを開始する 'ItemID 1、2 および 12 で項目を追加する new_selections.Add my_setting.AllPossibleSelections.Item(2) 'Microsoft SPXII new_selections.Add my_setting.AllPossibleSelections.Item(4) 'Microsoft IPX new_selections.Add my_setting.AllPossibleSelections.Item(12) 'Microsoft NETBIOS my_setting.Value = new_selections
指定した ID で DtoSelectionItems コレクションから DtoSelectionItem オブジェクトを返します。
Collection
|
DtoSelectionItems コレクション
|
id
|
コレクションから取得する項目の ID。特定の選択項目の ID は DtoSelectionItem オブジェクトの ItemId プロパティを使って取得することができます。
|
my_selection_item
|
id に相当する DtoSelectionItem オブジェクト
|
Dim Result As DtoResult Dim Session As New DtoSession Result = Session.Connect("nik-ntws", "", "") Dim my_setting As DtoSetting Dim SetID As Long SetID = 26 Set my_setting = Session.GetSetting(SetID) If my_setting Is Nothing Then MsgBox " Setting is wrong" Exit Sub End If Dim new_selections As New DtoSelectionItems new_selections.Add my_setting.AllPossibleSelections.GetByID(1) 'Microsoft SPXII new_selections.Add my_setting.AllPossibleSelections.GetByID(3) 'Microsoft TCP/IP new_selections.Add my_setting.AllPossibleSelections.GetByID(11) 'Microsoft NETBIOS my_setting.Value = new_selections
DtoSelectionItems コレクションから項目を削除します。
result
|
メソッド呼び出しの結果を示す DtoResult(Long 型の値)。DtoSession オブジェクトの Error プロパティを使って結果の説明を取得します。
|
このメソッドには DtoSelectionItem タイプのパラメーターが必要です。
Dim Result As DtoResult Dim Session As New DtoSession Result = Session.Connect("nik-ntws", "", "") Dim my_setting As DtoSetting Dim SetID As Long SetID = 26 Set my_setting = Session.GetSetting(SetID) If my_setting Is Nothing Then MsgBox " Setting is wrong" Exit Sub End If Dim new_selections As New DtoSelectionItems new_selections.Add my_setting.AllPossibleSelections.GetByID(1) 'Microsoft SPXII new_selections.Remove(1) my_setting.Value = new_selections
|