From 979f71a37ba49d818b97faeceb9bee48f5b3c480 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Mon, 2 Oct 2006 16:01:10 +0000 Subject: [PATCH] Forgot to commit latest sample changes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/dataview/dataview.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/samples/dataview/dataview.cpp b/samples/dataview/dataview.cpp index 4014110cbb..c77bab02ae 100644 --- a/samples/dataview/dataview.cpp +++ b/samples/dataview/dataview.cpp @@ -207,9 +207,9 @@ public: variant = m_list[row]; return; } - if (col == 2) + if ((col == 2) || (col == 3)) { - variant = &m_bitmap; + variant << m_bitmap; return; } wxString tmp; @@ -350,7 +350,7 @@ bool MyApp::OnInit(void) frame2->Show(true); SetTopWindow(frame); - + return true; } @@ -484,16 +484,19 @@ MySortingFrame::MySortingFrame(wxFrame *frame, wxChar *title, int x, int y, int wxDataViewColumn *column = new wxDataViewColumn( wxT("editable"), text_cell, 0 ); dataview_left->AppendColumn( column ); dataview_left->AppendTextColumn( wxT("second"), 1 ); - dataview_left->AppendColumn( new wxDataViewColumn( wxT("icon"), new wxDataViewBitmapCell, 2 ) ); + dataview_left->AppendColumn( new wxDataViewColumn( wxT("icon"), new wxDataViewBitmapCell, 2, 25 ) ); + dataview_left->AppendColumn( new wxDataViewColumn( wxT("icon"), new wxDataViewBitmapCell, 3, 25 ) ); // Right wxDataViewCtrl using the sorting model dataview_right = new wxDataViewCtrl( this, wxID_ANY ); + wxDataViewSortedListModel *sorted_model = new wxDataViewSortedListModel( m_unsorted_model ); dataview_right->AssociateModel( sorted_model ); text_cell = new wxDataViewTextCell( wxT("string"), wxDATAVIEW_CELL_EDITABLE ); - column = new wxDataViewColumn( wxT("editable"), text_cell, 0 ); + column = new wxDataViewColumn( wxT("editable"), text_cell, 0, -1, wxDATAVIEW_COL_SORTABLE|wxDATAVIEW_COL_RESIZABLE ); dataview_right->AppendColumn( column ); + dataview_right->AppendTextColumn( wxT("second"), 1 ); // layout dataview controls. -- 2.45.2