+ wxMenu *menuList = new wxMenu;
+ menuList->Append(LIST_GOTO, _T("&Go to item #3\tCtrl-3"));
+ menuList->Append(LIST_FOCUS_LAST, _T("&Make last item current\tCtrl-L"));
+ menuList->Append(LIST_TOGGLE_FIRST, _T("To&ggle first item\tCtrl-G"));
+ menuList->Append(LIST_DESELECT_ALL, _T("&Deselect All\tCtrl-D"));
+ menuList->Append(LIST_SELECT_ALL, _T("S&elect All\tCtrl-A"));
+ menuList->AppendSeparator();
+ menuList->Append(LIST_SHOW_COL_INFO, _T("Show &column info\tCtrl-C"));
+ menuList->Append(LIST_SHOW_SEL_INFO, _T("Show &selected items\tCtrl-S"));
+ menuList->Append(LIST_SHOW_VIEW_RECT, _T("Show &view rect"));
+#ifdef wxHAS_LISTCTRL_COLUMN_ORDER
+ menuList->Append(LIST_SET_COL_ORDER, _T("Se&t columns order\tShift-Ctrl-O"));
+ menuList->Append(LIST_GET_COL_ORDER, _T("Sho&w columns order\tCtrl-O"));
+#endif // wxHAS_LISTCTRL_COLUMN_ORDER
+ menuList->AppendSeparator();
+ menuList->Append(LIST_SORT, _T("Sor&t\tCtrl-T"));
+ menuList->Append(LIST_FIND, "Test Find() performance");
+ menuList->AppendSeparator();
+ menuList->Append(LIST_ADD, _T("&Append an item\tCtrl-P"));
+ menuList->Append(LIST_EDIT, _T("&Edit the item\tCtrl-E"));
+ menuList->Append(LIST_DELETE, _T("&Delete first item\tCtrl-X"));
+ menuList->Append(LIST_DELETE_ALL, _T("Delete &all items"));
+ menuList->AppendSeparator();
+ menuList->Append(LIST_FREEZE, _T("Free&ze\tCtrl-Z"));
+ menuList->Append(LIST_THAW, _T("Tha&w\tCtrl-W"));
+ menuList->AppendSeparator();
+ menuList->AppendCheckItem(LIST_TOGGLE_LINES, _T("Toggle &lines\tCtrl-I"));
+ menuList->Append(LIST_TOGGLE_MULTI_SEL, _T("&Multiple selection\tCtrl-M"),
+ _T("Toggle multiple selection"), true);
+
+ wxMenu *menuCol = new wxMenu;
+ menuCol->Append(LIST_SET_FG_COL, _T("&Foreground colour..."));
+ menuCol->Append(LIST_SET_BG_COL, _T("&Background colour..."));
+
+ wxMenuBar *menubar = new wxMenuBar;
+ menubar->Append(menuFile, _T("&File"));
+ menubar->Append(menuView, _T("&View"));
+ menubar->Append(menuList, _T("&List"));
+ menubar->Append(menuCol, _T("&Colour"));
+ SetMenuBar(menubar);
+
+ m_panel = new wxPanel(this, wxID_ANY);
+ m_logWindow = new wxTextCtrl(m_panel, wxID_ANY, wxEmptyString,
+ wxDefaultPosition, wxDefaultSize,
+ wxTE_READONLY | wxTE_MULTILINE | wxSUNKEN_BORDER);
+
+ m_logOld = wxLog::SetActiveTarget(new wxLogTextCtrl(m_logWindow));
+
+ RecreateList(wxLC_REPORT | wxLC_SINGLE_SEL);
+
+#ifdef __WXMSW__
+ // this is useful to know specially when debugging :)
+ wxLogMessage("Your version of comctl32.dll is: %d",
+ wxApp::GetComCtl32Version());