Add row activated event.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41626 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -305,7 +305,8 @@ enum my_events
|
||||
ID_EDIT_ROW_RIGHT,
|
||||
|
||||
ID_SORTED,
|
||||
ID_UNSORTED
|
||||
ID_UNSORTED,
|
||||
ID_ACTIVATED
|
||||
};
|
||||
|
||||
class MySortingFrame: public wxFrame
|
||||
@@ -335,6 +336,7 @@ public:
|
||||
|
||||
void OnSelectedUnsorted(wxDataViewEvent &event);
|
||||
void OnSelectedSorted(wxDataViewEvent &event);
|
||||
void OnActivatedUnsorted(wxDataViewEvent &event);
|
||||
|
||||
private:
|
||||
wxDataViewCtrl* dataview_left;
|
||||
@@ -471,6 +473,7 @@ BEGIN_EVENT_TABLE(MySortingFrame,wxFrame)
|
||||
EVT_BUTTON( ID_UNSELECT_ALL, MySortingFrame::OnUnselectAll )
|
||||
EVT_DATAVIEW_ROW_SELECTED( ID_SORTED, MySortingFrame::OnSelectedSorted )
|
||||
EVT_DATAVIEW_ROW_SELECTED( ID_UNSORTED, MySortingFrame::OnSelectedUnsorted )
|
||||
EVT_DATAVIEW_ROW_ACTIVATED( ID_UNSORTED, MySortingFrame::OnActivatedUnsorted )
|
||||
END_EVENT_TABLE()
|
||||
|
||||
MySortingFrame::MySortingFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h):
|
||||
@@ -584,6 +587,11 @@ void MySortingFrame::OnSelectedSorted(wxDataViewEvent &event)
|
||||
wxLogMessage( wxT("OnSelected from sorted list, selected %d"), (int) event.GetRow() );
|
||||
}
|
||||
|
||||
void MySortingFrame::OnActivatedUnsorted(wxDataViewEvent &event)
|
||||
{
|
||||
wxLogMessage( wxT("OnActivated from unsorted list, activated %d"), (int) event.GetRow() );
|
||||
}
|
||||
|
||||
void MySortingFrame::OnQuit(wxCommandEvent& WXUNUSED(event) )
|
||||
{
|
||||
Close(true);
|
||||
|
Reference in New Issue
Block a user