檢視原始碼 wxMultiChoiceDialog (wx v2.4.3)

此類別代表一個顯示字串列表的對話框,並允許使用者選擇一個或多個。

樣式

此類別支援以下樣式

  • wxOK: 顯示一個「確定」按鈕。

  • wxCANCEL: 顯示一個「取消」按鈕。

  • wxCENTRE: 將訊息置中。

參見

此類別衍生自,且可以使用下列類別的函式:

wxWidgets 文件: wxMultiChoiceDialog

摘要

函式

銷毀物件

返回一個包含已選取項目索引的陣列。

建構子,接受一個 wxString 陣列(在 wx 中未實作)作為選項。

從已選取項目的索引陣列中設定已選取的項目。

型別

-type wxMultiChoiceDialog() :: wx:wx_object().

函式

-spec destroy(This :: wxMultiChoiceDialog()) -> ok.

銷毀物件

-spec getSelections(This) -> [integer()] when This :: wxMultiChoiceDialog().

返回一個包含已選取項目索引的陣列。

連結到此函式

new(Parent, Message, Caption, Choices)

檢視原始碼
-spec new(Parent, Message, Caption, Choices) -> wxMultiChoiceDialog()
             when
                 Parent :: wxWindow:wxWindow(),
                 Message :: unicode:chardata(),
                 Caption :: unicode:chardata(),
                 Choices :: [unicode:chardata()].

等同於 new(Parent, Message, Caption, Choices, [])

-spec new(Parent, Message, Caption, Choices, [Option]) -> wxMultiChoiceDialog()
             when
                 Parent :: wxWindow:wxWindow(),
                 Message :: unicode:chardata(),
                 Caption :: unicode:chardata(),
                 Choices :: [unicode:chardata()],
                 Option :: {style, integer()} | {pos, {X :: integer(), Y :: integer()}}.

建構子,接受一個 wxString 陣列(在 wx 中未實作)作為選項。

備註:使用 wxDialog:showModal/1 來顯示對話框。

連結到此函式

setSelections(This, Selections)

檢視原始碼
-spec setSelections(This, Selections) -> ok
                       when This :: wxMultiChoiceDialog(), Selections :: [integer()].

從已選取項目的索引陣列中設定已選取的項目。