Re: How to set button label properties

Hello, Sasha

Yes, you can. The Button object can contain any widget. But by
default, it contains only Gtk::Label. My advice is to create the
label, made with Pango markup, and then place it to button (button is
derived from Gtk::Container).

First of all, create empty Gtk::Label and use the function:
void Gtk::Label::set_markup (const Glib::ustring& str)
(for example:
Gtk::Label lbl_vest;
it will underscore the label)

And then create an empty button and add the label with
virtual void Gtk::Container::add (Widget& widget) [virtual]
Gtk::Button btn_vest;

I hope, you've caught the idea.

Good luck,
Vlad Volodin

2009/5/2 Саша Иваненко <kitovyj mail ru>:
> Hi again,
> Are there any ways to modify the style of the text that appears on the Gtk::Button? I want it to have
> defferent color and be underscored(no, I don't want it to be a reference).
> Thank you.
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org

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