wxDataViewTextRenderer *tr = new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_INERT );
wxDataViewColumn *column0 = new wxDataViewColumn( wxT("title"), tr, 0, 200, wxALIGN_LEFT,
- wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_REORDERABLE | wxDATAVIEW_COL_RESIZABLE );
+ wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE );
m_musicCtrl->AppendColumn( column0 );
#if 0
// Call this and sorting is enabled
wxString title = m_music_model->GetTitle( event.GetItem() );
wxLogMessage(wxT("wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, Item: %s"), title );
+
+ if (m_musicCtrl->IsExpanded( event.GetItem() ))
+ wxLogMessage(wxT("Item: %s is expanded"), title );
}
void MyFrame::OnSelectionChanged( wxDataViewEvent &event )
void MyFrame::OnHeaderClick( wxDataViewEvent &event )
{
+ // we need to skip the event to let the default behaviour of sorting by
+ // this column when it is clicked to take place
+ event.Skip();
+
if(!m_log)
return;