Re: setting a button label overwrites label's color?
- From: Murray Cumming <murrayc murrayc com>
- To: Tim Flechtner <timf trdlnk com>
- Cc: gtkmm-list gnome org
- Subject: Re: setting a button label overwrites label's color?
- Date: Thu, 26 May 2005 21:29:46 +0200
On Wed, 2005-05-25 at 15:23 -0500, Tim Flechtner wrote:
> 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?
This sounds like a GTK+ bug that you should report in bugzilla. You
should be able to work around it in the meantime.
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]