+ wxDataViewColumn *col = m_musicCtrl->AppendTextColumn( "Title", 0, wxDATAVIEW_CELL_INERT, 200,
+ DEFAULT_ALIGN, wxDATAVIEW_COL_SORTABLE );
+#if 0
+ // Call this and sorting is enabled
+ // immediatly upon start up.
+ col->SetSortOrder( true );
+#endif
+
+ m_musicCtrl->AppendTextColumn( "Artist", 1, wxDATAVIEW_CELL_EDITABLE, 150,
+ DEFAULT_ALIGN, wxDATAVIEW_COL_SORTABLE );
+
+ MySpinCtrlInPlaceRenderer *sr = new MySpinCtrlInPlaceRenderer;
+ wxDataViewColumn *column = new wxDataViewColumn( "year", sr, 2, -1, wxALIGN_CENTRE, wxDATAVIEW_COL_SORTABLE );
+ m_musicCtrl->AppendColumn( column );
+
+ data_sizer->Add( m_musicCtrl, 3, wxGROW );
+
+#if 1
+
+ // MyList
+
+ m_listCtrl = new wxDataViewCtrl( this, wxID_ANY, wxDefaultPosition,
+ wxDefaultSize, wxDV_MULTIPLE );
+
+ m_list_model = new MyListModel;
+ m_listCtrl->AssociateModel( m_list_model.get() );
+
+ m_listCtrl->AppendTextColumn( "editable string", 0, wxDATAVIEW_CELL_EDITABLE, 120 );
+ m_listCtrl->AppendIconTextColumn( "icon", 1, wxDATAVIEW_CELL_INERT, 60 );
+ m_listCtrl->AppendTextColumn( "index", 2, wxDATAVIEW_CELL_INERT, 120 );
+
+ data_sizer->Add( m_listCtrl, 2, wxGROW );
+
+#endif
+
+ main_sizer->Add( data_sizer, 2, wxGROW );
+
+ wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
+
+ button_sizer->Add( new wxButton( this, ID_ADD_MOZART, "Add Mozart"), 0, wxALL, 10 );
+ button_sizer->Add( new wxButton( this, ID_DELETE_MUSIC, "Delete selected"), 0, wxALL, 10 );
+ button_sizer->Add( 10, 10, 1 );
+ button_sizer->Add( new wxButton( this, ID_PREPEND_LIST, "Prepend"), 0, wxALL, 10 );
+ button_sizer->Add( new wxButton( this, ID_DELETE_LIST, "Delete selected"), 0, wxALL, 10 );
+ button_sizer->Add( new wxButton( this, ID_GOTO, "Goto 50"), 0, wxALL, 10 );
+
+ main_sizer->Add( button_sizer, 0, wxGROW, 0 );
+
+ m_log = new wxTextCtrl( this, -1, "", wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
+ m_logOld = wxLog::SetActiveTarget(new wxLogTextCtrl(m_log));
+ wxLogMessage("This is the log window");
+
+ main_sizer->Add( m_log, 1, wxGROW );
+
+ SetSizer( main_sizer );