ToggleToolButton doesn't display its label



I'd like to create a ToggleToolButton which should display an icon and a
label like this:

 _______________________
|                                        |
|     [Icon] "Button Label"     |
|_______________________|

This code lead to a button with an icon:

Gtk::Image * buttonImage_ = new Gtk::Image("C:\\tmp\\icon.gif");
Gtk::ToggleToolButton * ttbutton = Gtk::manage(new
Gtk::ToggleToolButton(*buttonImage_, "Button Label"));


I also tried this

Gtk::Image * buttonImage = new Gtk::Image("C:\\tmp\\icon.gif");
Gtk::ToggleToolButton * ttButton = new Gtk::ToggleToolButton();
ttButton->set_icon_widget(*buttonImage);
ttButton->set_label("Button Label");


and this

Gtk::Image * buttonImage = new Gtk::Image("C:\\tmp\\icon.gif");
Gtk::Label * buttonLabel = new Gtk::
Gtk::ToggleToolButton * ttButton = new Gtk::ToggleToolButton();
ttButton->set_icon_widget(*buttonImage);
ttButton->set_label(*buttonLabel);

All three variants lead to a button, displaying an icon, but no text.
Adding only the text resulted in an "empty" button.
When adding the buttonLabel as icon_widget, the button displayed the
label, but how to add the icon, now? :S
I even tried to encapsulate the icon and the label in a single Widget
and add it as icon_widget, but that (again) lead to an empty button.

Any help would be appreciated. Thanks in advance!!!
--
View this message in context: http://www.nabble.com/ToggleToolButton-doesn%27t-display-its-label-t1245595.html#a3298087
Sent from the Gtkmm forum at Nabble.com.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]