+ int col = event.GetColumn();
+ SetColumnImage(col, 0);
+
+ wxLogMessage( wxT("OnColumnClick at %d."), col );
+}
+
+void MyListCtrl::OnColRightClick(wxListEvent& event)
+{
+ int col = event.GetColumn();
+ if ( col != -1 )
+ {
+ SetColumnImage(col, -1);
+ }
+
+ // Show popupmenu at position
+ wxMenu menu(wxT("Test"));
+ menu.Append(LIST_ABOUT, _T("&About"));
+ PopupMenu(&menu, event.GetPoint());
+
+ wxLogMessage( wxT("OnColumnRightClick at %d."), event.GetColumn() );
+}
+
+void MyListCtrl::LogColEvent(const wxListEvent& event, const wxChar *name)
+{
+ const int col = event.GetColumn();
+
+ wxLogMessage(wxT("%s: column %d (width = %d or %d)."),
+ name,
+ col,
+ event.GetItem().GetWidth(),
+ GetColumnWidth(col));
+}
+
+void MyListCtrl::OnColBeginDrag(wxListEvent& event)
+{
+ LogColEvent( event, wxT("OnColBeginDrag") );
+
+ if ( event.GetColumn() == 0 )
+ {
+ wxLogMessage(_T("Resizing this column shouldn't work."));
+
+ event.Veto();
+ }
+}
+
+void MyListCtrl::OnColDragging(wxListEvent& event)
+{
+ LogColEvent( event, wxT("OnColDragging") );
+}
+
+void MyListCtrl::OnColEndDrag(wxListEvent& event)
+{
+ LogColEvent( event, wxT("OnColEndDrag") );