Re: changing button color



On 1/9/07, Joe Van Dyk <joevandyk gmail com> wrote:
On 1/9/07, Joe Van Dyk <joevandyk gmail com> wrote:
> Hi,
>
> Can't seem to find the answer to this....
>
> How do I change the color of a button?  For example, depending on the
> state of an application, I want a button to sometimes be red and to
> sometimes be normal color.

Nevermind, found it.

   const static Gdk::Color yellow("yellow");
   button->modify_bg(Gtk::STATE_NORMAL, yellow);

Is it possible to set a button to be yellow for all Gtk::StateTypes
without needing to call modify_bg() for each state?

Joe



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