ドロップダウン (複数) - Add メソッド

アイテムをドロップダウンに追加します

ドロップダウン (複数) (PRIM_MD.DropdownItems) のメンバ

パラメーター

名前タイプデータ タイプ記述
Result*Result (任意)PRIM_MD.DropdownItem新規アイテム インスタンスへの参照
Value*Input文字列アイテムの基本となる値
Caption*Input (任意)文字列ドロップダウン入力に表示する値

詳細

Add メソッドを使って、ドロップダウンにアイテムを追加します。
 
これは ADD_ENTRY コマンドを使うのと同じです。

追加ボタンをクリックすると、ドロップダウンにアイテムが追加されます。
Begin_Com Role(*EXTENDS #PRIM_WEB) Height(408) Width(809)
 
   Define_Com Class(#PRIM_MD.Dropdown) Name(#DropDown) DisplayPosition(1) Label('DropDown') Left(35) Parent(#COM_OWNER) TabPosition(1) Top(16)
   Define_Com Class(#PRIM_MD.FlatButton) Name(#Button) Caption('Add') DisplayPosition(2) Left(301) Parent(#COM_OWNER) TabPosition(2) Top(38)
 
   Evtroutine Handling(#Com_owner.CreateInstance)
 
      Begin_Loop To(3)
         #DropDown.Items.Add( ("Item &1").Substitute( (#DropDown.Items.ItemCount + 1).AsString ) )
      End_Loop
 
   Endroutine
 
   Evtroutine Handling(#Button.Click)
 
      #DropDown.Items.Add( ("Item &1").Substitute( (#DropDown.Items.ItemCount + 1).AsString ) )
 
   Endroutine
 
End_Com

参照

すべてのコンポーネント クラス

テクニカルリファレンス

EPC142030 February 2019