setting a button label overwrites label's color?
- From: Tim Flechtner <timf trdlnk com>
- To: gtkmm-list gnome org
- Subject: setting a button label overwrites label's color?
- Date: Wed, 25 May 2005 15:23:56 -0500
hello gtkmmers,
i have an object of Gtk::Button, in which i set the object's label's
color by calling code like:
void setButton(Gtk::Button& button, std::string& s, Gdk::Color color)
{
b.get_child()->modify_fg(Gtk::STATE_NORMAL, color);
b.set_label(s);
}
after this code executes, the button's label has reverted to the default
color for label text. i believe that the call to set_label resets its
color. if i invert the order of the two lines in the above function, i
get the color i therein. i would *really* like to be able to updated
the contents of the label without the color (and possibly other
characteristics, such as font) resetting. does anyone know how i can do so?
thanks!
-tim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]