Combobox dans une Toolbar
Bonjour,
je cherche le moyen de mettre une combobox dans une toolbar.
Voilà ce que j'ai fais, et qui ne fonctionne pas :roll:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| m_toolbar = new wxToolBar(this, TOOLBAR_TOOLS, wxDefaultPosition, wxDefaultSize, wxTB_HORIZONTAL | wxNO_BORDER );
wxBitmap toolBarBitmaps[6];
wxInitAllImageHandlers(); // utilisé pour pouvoir lire des fichiers png
toolBarBitmaps[0] = wxBitmap(_("../../img/filenew.png"),wxBITMAP_TYPE_PNG);
toolBarBitmaps[1] = wxBitmap(_("../../img/filefind.png"),wxBITMAP_TYPE_PNG);
toolBarBitmaps[2] = wxBitmap(_("../../img/fileopen.png"),wxBITMAP_TYPE_PNG);
m_toolbar->SetToolBitmapSize(wxSize(toolBarBitmaps[0].GetWidth(),toolBarBitmaps[0].GetHeight()));
m_toolbar->AddTool(MENU_BASE, _("Nouveau"), toolBarBitmaps[0]);
m_toolbar->AddTool(MENU_BASE, _("Nouveau"), toolBarBitmaps[1]);
m_toolbar->AddTool(MENU_BASE, _("Nouveau"), toolBarBitmaps[2]);
m_toolbar->AddSeparator();
wxString choices[1];
choices[0] = "oooo";
combobox = new wxComboBox( this, COMBOBOX, "toto", wxDefaultPosition, wxDefaultSize, 1, choices, wxCB_DROPDOWN );
// m_toolbar->AddControl( combobox );
m_toolbar->InsertControl( 1, combobox );
SetToolBar(m_toolbar);
m_toolbar->Realize(); |
Les boutons s'affichent bien mais pas de trace d'une combobox... quelqu'un a une piste ?