+ wxMenu *menuList = new wxMenu;
+ menuList->Append(LIST_GOTO, wxT("&Go to item #3\tCtrl-3"));
+ menuList->Append(LIST_FOCUS_LAST, wxT("&Make last item current\tCtrl-L"));
+ menuList->Append(LIST_TOGGLE_FIRST, wxT("To&ggle first item\tCtrl-G"));
+ menuList->Append(LIST_DESELECT_ALL, wxT("&Deselect All\tCtrl-D"));
+ menuList->Append(LIST_SELECT_ALL, wxT("S&elect All\tCtrl-A"));
+ menuList->AppendSeparator();
+ menuList->Append(LIST_SHOW_COL_INFO, wxT("Show &column info\tCtrl-C"));
+ menuList->Append(LIST_SHOW_SEL_INFO, wxT("Show &selected items\tCtrl-S"));
+ menuList->Append(LIST_SHOW_VIEW_RECT, wxT("Show &view rect"));
+#ifdef wxHAS_LISTCTRL_COLUMN_ORDER
+ menuList->Append(LIST_SET_COL_ORDER, wxT("Se&t columns order\tShift-Ctrl-O"));
+ menuList->Append(LIST_GET_COL_ORDER, wxT("Sho&w columns order\tCtrl-O"));
+#endif // wxHAS_LISTCTRL_COLUMN_ORDER
+ menuList->AppendSeparator();
+ menuList->Append(LIST_SORT, wxT("Sor&t\tCtrl-T"));
+ menuList->Append(LIST_FIND, "Test Find() performance");
+ menuList->AppendSeparator();
+ menuList->Append(LIST_ADD, wxT("&Append an item\tCtrl-P"));
+ menuList->Append(LIST_EDIT, wxT("&Edit the item\tCtrl-E"));
+ menuList->Append(LIST_DELETE, wxT("&Delete first item\tCtrl-X"));
+ menuList->Append(LIST_DELETE_ALL, wxT("Delete &all items"));
+ menuList->AppendSeparator();
+ menuList->Append(LIST_FREEZE, wxT("Free&ze\tCtrl-Z"));
+ menuList->Append(LIST_THAW, wxT("Tha&w\tCtrl-W"));
+ menuList->AppendSeparator();
+ menuList->AppendCheckItem(LIST_TOGGLE_LINES, wxT("Toggle &lines\tCtrl-I"));
+ menuList->Append(LIST_TOGGLE_MULTI_SEL, wxT("&Multiple selection\tCtrl-M"),
+ wxT("Toggle multiple selection"), true);
+
+ wxMenu *menuCol = new wxMenu;
+ menuCol->Append(LIST_SET_FG_COL, wxT("&Foreground colour..."));
+ menuCol->Append(LIST_SET_BG_COL, wxT("&Background colour..."));
+
+ wxMenuBar *menubar = new wxMenuBar;
+ menubar->Append(menuFile, wxT("&File"));
+ menubar->Append(menuView, wxT("&View"));
+ menubar->Append(menuList, wxT("&List"));
+ menubar->Append(menuCol, wxT("&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());