檢視原始碼 wxListEvent (wx v2.4.3)
列表事件保存與 wxListCtrl
物件相關的事件資訊。
參閱:wxListCtrl
此類別繼承自以下類別,並可以使用它們的函式:
wxWidgets 文件:wxListEvent
事件
使用 wxEvtHandler:connect/3
和 wxListEventType
來訂閱此類型的事件。
摘要
函式
僅針對 EVT\_LIST\_CACHE\_HINT
事件:傳回列表控制項建議我們快取的第一個項目。
僅針對 EVT\_LIST\_CACHE\_HINT
事件:傳回列表控制項建議我們快取的最後一個項目(包含)。
欄位位置:僅用於 COL
事件。
資料。
圖像。
項目索引。
某些事件使用的項目物件。
如果事件是按鍵事件,則為按鍵代碼。
用於 EVT_LIST_END_LABEL_EDIT
事件的(新的)項目標籤。
遮罩。
如果事件是拖曳事件,則為滑鼠指標的位置。
文字。
此方法僅適用於 EVT\_LIST\_END\_LABEL\_EDIT
訊息,如果使用者已取消標籤編輯則傳回 true(getLabel/1
在此情況下會傳回空字串,但它不允許應用程式區分是真的取消編輯,還是使用者真的想將其重新命名為空字串的罕見情況)。
類型
-type wxListEvent() :: wx:wx_object().
-type wxListEventType() ::
command_list_begin_drag | command_list_begin_rdrag | command_list_begin_label_edit |
command_list_end_label_edit | command_list_delete_item | command_list_delete_all_items |
command_list_key_down | command_list_insert_item | command_list_col_click |
command_list_col_right_click | command_list_col_begin_drag | command_list_col_dragging |
command_list_col_end_drag | command_list_item_selected | command_list_item_deselected |
command_list_item_right_click | command_list_item_middle_click | command_list_item_activated |
command_list_item_focused | command_list_cache_hint.
函式
-spec getCacheFrom(This) -> integer() when This :: wxListEvent().
僅針對 EVT\_LIST\_CACHE\_HINT
事件:傳回列表控制項建議我們快取的第一個項目。
-spec getCacheTo(This) -> integer() when This :: wxListEvent().
僅針對 EVT\_LIST\_CACHE\_HINT
事件:傳回列表控制項建議我們快取的最後一個項目(包含)。
-spec getColumn(This) -> integer() when This :: wxListEvent().
欄位位置:僅用於 COL
事件。
對於欄位拖曳事件,它是被拖曳的分隔線左側的欄位,對於欄位點擊事件,如果使用者點擊列表控制項標頭的任何欄位之外,則可能為 -1。
-spec getData(This) -> integer() when This :: wxListEvent().
資料。
-spec getImage(This) -> integer() when This :: wxListEvent().
圖像。
-spec getIndex(This) -> integer() when This :: wxListEvent().
項目索引。
-spec getItem(This) -> wxListItem:wxListItem() when This :: wxListEvent().
某些事件使用的項目物件。
另請參閱 wxListCtrl:setItem/5
。
-spec getKeyCode(This) -> integer() when This :: wxListEvent().
如果事件是按鍵事件,則為按鍵代碼。
-spec getLabel(This) -> unicode:charlist() when This :: wxListEvent().
用於 EVT_LIST_END_LABEL_EDIT
事件的(新的)項目標籤。
-spec getMask(This) -> integer() when This :: wxListEvent().
遮罩。
-spec getPoint(This) -> {X :: integer(), Y :: integer()} when This :: wxListEvent().
如果事件是拖曳事件,則為滑鼠指標的位置。
-spec getText(This) -> unicode:charlist() when This :: wxListEvent().
文字。
-spec isEditCancelled(This) -> boolean() when This :: wxListEvent().
此方法僅適用於 EVT\_LIST\_END\_LABEL\_EDIT
訊息,如果使用者已取消標籤編輯則傳回 true(getLabel/1
在此情況下會傳回空字串,但它不允許應用程式區分是真的取消編輯,還是使用者真的想將其重新命名為空字串的罕見情況)。