wxRibbon menu-AddDropdownButton icon horizontal ?

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Lech Kozarski
Earned a small fee
Earned a small fee
Posts: 20
Joined: Sat Nov 26, 2011 3:15 pm

wxRibbon menu-AddDropdownButton icon horizontal ?

Post by Lech Kozarski » Sun Jan 06, 2013 11:24 am

Hi.
I have wxRibbon menu
First I make wxRibbonBar -> wxRibbonPage -> wxRibbonPanel and there I put AddDropdownButton
How do I set the icon to the left or the right of Products rodukty) ?
This is the first item on the AddDropdownButton
I have done so for all elements, and only the first one that always sets me on top of the icon.

My code:
wxRibbonBar* moj_ribbon = new wxRibbonBar(this, wxID_ANY,
wxDefaultPosition, wxDefaultSize,
wxRIBBON_BAR_DEFAULT_STYLE |
wxRIBBON_BAR_SHOW_PAGE_ICONS |
wxRIBBON_BAR_SHOW_PANEL_EXT_BUTTONS);

wxRibbonPage* kproduct = new wxRibbonPage(moj_ribbon, wxID_ANY, _("Product"), wxBitmap(colours_xpm));
wxRibbonPage* kcustomer = new wxRibbonPage(moj_ribbon, wxID_ANY, _("Customer"), wxBitmap(colours_xpm));

wxRibbonPanel *pproduct = new wxRibbonPanel(kproduct, wxID_ANY, _("Panel product"));
wxRibbonPanel *pcustomer = new wxRibbonPanel(kcustomer, wxID_ANY, _("Panel customer"));

wxRibbonButtonBar *bproduct = new wxRibbonButtonBar(pproduct, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxRIBBON_BUTTONBAR_BUTTON_SMALL);
bproduct->AddDropdownButton(ID_PRODUKTY, _("Produkty"), circle_xpm, wxEmptyString);
bproduct->AddDropdownButton(ID_PTRANSAKCJA, _("PTransakcje"), circle_xpm, wxEmptyString);
bproduct->AddDropdownButton(ID_PTOOLS, _("PTools"), circle_xpm, wxEmptyString);
bproduct->AddDropdownButton(ID_PWYDRUKI, _("PWydruki"), circle_small_xpm, wxEmptyString);
// ===============
Attachments
ribbon1.jpg
ribbon1.jpg (40.59 KiB) Viewed 755 times

Post Reply