- wxComboBox *combo = new wxComboBox(toolBar, ID_COMBO, _T(""), wxDefaultPosition, wxSize(200,-1) );
- combo->Append(_T("This"));
- combo->Append(_T("is a"));
- combo->Append(_T("combobox"));
- combo->Append(_T("in a"));
- combo->Append(_T("toolbar"));
- toolBar->AddControl(combo);
+ wxComboBox *combo = new wxComboBox(toolBar, ID_COMBO, wxEmptyString, wxDefaultPosition, wxSize(100,-1) );
+ combo->Append(wxT("This"));
+ combo->Append(wxT("is a"));
+ combo->Append(wxT("combobox"));
+ combo->Append(wxT("in a"));
+ combo->Append(wxT("toolbar"));
+ toolBar->AddControl(combo, wxT("Combo Label"));
+ }
+#endif // USE_CONTROLS_IN_TOOLBAR
+
+ toolBar->AddTool(wxID_SAVE, wxT("Save"), toolBarBitmaps[Tool_save], wxT("Toggle button 1"), wxITEM_CHECK);
+ toolBar->AddTool(wxID_COPY, wxT("Copy"), toolBarBitmaps[Tool_copy], wxT("Toggle button 2"), wxITEM_CHECK);
+ toolBar->AddTool(wxID_CUT, wxT("Cut"), toolBarBitmaps[Tool_cut], wxT("Toggle/Untoggle help button"));
+ toolBar->AddTool(wxID_PASTE, wxT("Paste"), toolBarBitmaps[Tool_paste], wxT("Paste"));
+
+ if ( m_useCustomDisabled )
+ {
+ wxBitmap bmpDisabled(w, h);
+ {
+ wxMemoryDC dc;
+ dc.SelectObject(bmpDisabled);
+ dc.DrawBitmap(toolBarBitmaps[Tool_print], 0, 0);
+
+ wxPen pen(*wxRED, 5);
+ dc.SetPen(pen);
+ dc.DrawLine(0, 0, w, h);
+ }
+
+ toolBar->AddTool(wxID_PRINT, wxT("Print"), toolBarBitmaps[Tool_print],
+ bmpDisabled);
+ }
+ else
+ {
+ toolBar->AddTool(wxID_PRINT, wxT("Print"), toolBarBitmaps[Tool_print],
+ wxT("Delete this tool. This is a very long tooltip to test whether it does the right thing when the tooltip is more than Windows can cope with."));