- toolBar->AddTool(wxID_NEW, _T("New"), toolBarBitmaps[Tool_new], _T("New file"));
- toolBar->AddTool(wxID_OPEN, _T("Open"), toolBarBitmaps[Tool_open], _T("Open file"));
+ // this call is actually unnecessary as the toolbar will adjust its tools
+ // size to fit the biggest icon used anyhow but it doesn't hurt neither
+ toolBar->SetToolBitmapSize(wxSize(w, h));
+
+ toolBar->AddTool(wxID_NEW, wxT("New"),
+ toolBarBitmaps[Tool_new], wxNullBitmap, wxITEM_DROPDOWN,
+ wxT("New file"), wxT("This is help for new file tool"));
+
+ wxMenu* menu = new wxMenu;
+ menu->Append(wxID_ANY, wxT("&First dummy item"));
+ menu->Append(wxID_ANY, wxT("&Second dummy item"));
+ menu->AppendSeparator();
+ menu->Append(wxID_EXIT, wxT("Exit"));
+ toolBar->SetDropdownMenu(wxID_NEW, menu);
+
+ toolBar->AddTool(wxID_OPEN, wxT("Open"),
+ toolBarBitmaps[Tool_open], wxNullBitmap, wxITEM_NORMAL,
+ wxT("Open file"), wxT("This is help for open file tool"));