X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/80ce465c64d6f250e26cd69e62671a189302e897..40730ad17db78193611389a3d12db772b28eac31:/samples/dataview/dataview.cpp diff --git a/samples/dataview/dataview.cpp b/samples/dataview/dataview.cpp index eb750bd33a..7dc4ea6a7a 100644 --- a/samples/dataview/dataview.cpp +++ b/samples/dataview/dataview.cpp @@ -294,7 +294,7 @@ enum ID_ADD_MANY = 203, ID_HIDE_ATTRIBUTES = 204, ID_SHOW_ATTRIBUTES = 205, - + // Fourth page. ID_DELETE_TREE_ITEM = 400, ID_DELETE_ALL_TREE_ITEMS = 401, @@ -360,9 +360,9 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) #endif // wxUSE_DRAG_AND_DROP EVT_RIGHT_UP(MyFrame::OnRightClick) - + EVT_DATAVIEW_COLUMN_HEADER_CLICK(ID_ATTR_CTRL, MyFrame::OnAttrHeaderClick) - + END_EVENT_TABLE() MyFrame::MyFrame(wxFrame *frame, const wxString &title, int x, int y, int w, int h): @@ -626,8 +626,8 @@ void MyFrame::BuildDataViewCtrl(wxPanel* parent, unsigned int nPanel, unsigned l m_ctrl[1]->AppendIconTextColumn("icon", MyListModel::Col_IconText, wxDATAVIEW_CELL_EDITABLE); - - m_attributes = + + m_attributes = new wxDataViewColumn("attributes", new wxDataViewTextRenderer, MyListModel::Col_TextWithAttr, @@ -1195,7 +1195,7 @@ void MyFrame::OnDeleteTreeItem(wxCommandEvent& WXUNUSED(event)) wxDataViewItem selected = ctrl->GetSelection(); if (!selected.IsOk()) return; - + ctrl->DeleteItem(selected); }