Getting closer!
I always have to fiddle with things for a while before they work right so don't
worry just yet. Buttons and such can have different styles depending on their
state, look at how your Gtk::Style object is set up, make sure you specify the
correct state (STATE_NORMAL is probably what you want).
If possible give some code sample of how things are set up if its still not
doing what you need.
---- Jim Barnes <[EMAIL PROTECTED]> wrote:
> Thanks for the suggestion. It does work, some what. When the button mode is
> pressed nothing appears to change in color, but when you mouse over the
> toolbutton, the button changes color. As soon as the mouse moves away from
> the toolbutton, the color changes back to the default color.
>
> Jim
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 01, 2007 9:51 AM
> To: Jim Barnes
> Cc: [email protected]
> Subject: Re: Changing background colors on Gtk::ToolItems
>
>
> I have'nt worked with a toolbutton before, but the docs describe the class as
> follows...
>
> A Gtk::ToolItem subclass that displays buttons.
> A ToolButton is are Gtk::ToolItem containing a button.
>
> So maybe you need to set the color on the button object thats inside the
> toolbutton. Perhaps something like this will work:
>
> toolbutton->get_child()->set_style(color_style);
>
> Thats what I would try.
>
> ---- Jim Barnes <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I'm trying to create a tool bar where the ToolButtons are used to control
> > Simulation Modes (Operate, Reset, Trim, etc.). To emphasize what mode has
> > been selected, I want to change the background color of the ToolButton.
> > Since the ToolButton is a Gtk::Widget I set up a new Gtk::Style with the
> > colors I wanted and when the mode is selected I set the style to the color
> > style.
> >
> > tool_button->set_style(color_style);
> >
> > However, the color never gets changed on the display. This approach does
> > work for Gtk:Button though.
> >
> > Is there any way to make this work that I haven't found yet?
> >
> > Thanks
> > Jim
> >
> > _______________________________________________
> > gtkmm-list mailing list
> > [email protected]
> > http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
>
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list