Re: How to set button label properties
- From: Vlad Volodin <vest 84 gmail com>
- To: Саша Иваненко <kitovyj mail ru>
- Cc: gtkmm-list gnome org
- Subject: Re: How to set button label properties
- Date: Sat, 2 May 2009 19:12:16 +0400
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;
lbl_vest.set_markup("<u>Vest</u>");
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;
btn_vest.add(lbl_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
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]