File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -609,6 +609,12 @@ class wxMetroDataViewTreeCtrl : public wxDataViewTreeCtrl
609609 const wxSize& size = wxDefaultSize,
610610 long style = wxDV_NO_HEADER,
611611 const wxValidator& validator = wxDefaultValidator);
612+
613+ void OnItemStartEditing (wxDataViewEvent& event)
614+ {
615+ // prevent editing
616+ event.Veto ();
617+ }
612618 /*
613619 wxMetroDataViewTreeStore* GetStore()
614620 {
Original file line number Diff line number Diff line change @@ -2122,9 +2122,11 @@ wxMetroDataViewTreeStoreContainerNode* wxMetroDataViewTreeStore::FindContainerNo
21222122wxIMPLEMENT_DYNAMIC_CLASS (wxMetroDataViewTreeCtrl, wxDataViewTreeCtrl);
21232123
21242124wxBEGIN_EVENT_TABLE (wxMetroDataViewTreeCtrl, wxDataViewTreeCtrl)
2125- EVT_DATAVIEW_ITEM_EXPANDED(- 1 , wxMetroDataViewTreeCtrl::OnExpanded)
2126- EVT_DATAVIEW_ITEM_COLLAPSED(- 1 , wxMetroDataViewTreeCtrl::OnCollapsed)
2125+ EVT_DATAVIEW_ITEM_EXPANDED(wxID_ANY , wxMetroDataViewTreeCtrl::OnExpanded)
2126+ EVT_DATAVIEW_ITEM_COLLAPSED(wxID_ANY , wxMetroDataViewTreeCtrl::OnCollapsed)
21272127EVT_SIZE(wxMetroDataViewTreeCtrl::OnSize)
2128+ EVT_DATAVIEW_ITEM_START_EDITING(wxID_ANY, wxMetroDataViewTreeCtrl::OnItemStartEditing)
2129+
21282130wxEND_EVENT_TABLE()
21292131
21302132bool wxMetroDataViewTreeCtrl::Create(wxWindow* parent, wxWindowID id,
You can’t perform that action at this time.
0 commit comments