CreateStatusBar();
+ wxPanel *panel = new wxPanel( this, -1 );
+
// Left wxDataViewCtrl
- dataview_left = new wxDataViewCtrl( this, wxID_ANY );
+ dataview_left = new wxDataViewCtrl( panel, wxID_ANY );
MyTextModel *model = new MyTextModel;
dataview_left->AssociateModel( model );
dataview_left->AppendDateColumn( wxT("date"), 6 );
// Right wxDataViewCtrl using the same model
- dataview_right = new wxDataViewCtrl( this, wxID_ANY );
+ dataview_right = new wxDataViewCtrl( panel, wxID_ANY );
dataview_right->AssociateModel( model );
text_cell = new wxDataViewTextCell( wxT("string"), wxDATAVIEW_CELL_EDITABLE );
dataview_right->AppendTextColumn( wxT("first"), 0 );
dataview_right->AppendTextColumn( wxT("second"), 1 );
wxDataViewToggleCell *toggle_cell = new wxDataViewToggleCell( wxT("bool"), wxDATAVIEW_CELL_ACTIVATABLE );
- column = new wxDataViewColumn( wxT("bool"), toggle_cell, 3 );
+ column = new wxDataViewColumn( wxT("bool"), toggle_cell, 3, 30 );
dataview_right->AppendColumn( column );
dataview_right->AppendDateColumn( wxT("date"), 6 );
sizer->Add( dataview_left, 3, wxGROW );
sizer->Add(10,10);
sizer->Add( dataview_right, 2, wxGROW );
- SetSizer( sizer );
+ panel->SetSizer( sizer );
}
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) )
// Left wxDataViewCtrl
- dataview_left = new wxDataViewCtrl( this, wxID_ANY );
+ dataview_left = new wxDataViewCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_MULTIPLE );
MyUnsortedTextModel *model = new MyUnsortedTextModel;
dataview_left->AssociateModel( model );