Re: ToggleToolButton doesn't display its label



You're adding it to a toolbar, right?  look at
Toolbar::set_toolbar_style().  Also, you might try the
ToolItem::set_is_important() function if you only want this button to
display the label, and not all of the other buttons in your toolbar.

It does seem like a bug that it doesn't show the label if a toolbar
button doesn't have an icon though.

Jonner

On 3/8/06, ReSet <r strohmeyer extessy com> wrote:
>
> 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.
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>



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