Re: is it possible to have a widget act as insensitive but look as it is sensitive?





On 28/12/05, Tristan Van Berkom <tristan van berkom gmail com> wrote:
Yiannis wrote:
> Hi,
>
> is it possible to have a widget (a toggle button in particular) act as
> insensitive but look as it is sensitive. More specific is it possible to
> have a toggle button act as insensitive once activated but look
> sensitive, ie without the grey shade?

Whatever you're doing, you're cheating ;-)

Yes, I know...., a necessity for visualisation reasons. :)

you can:
     o Make copies of the GdkColor structs on widget->style.bg[GTK_STATE_NORMAL]
       (or is it ACTIVE ?), you might also want the .fg, .base & .text members.
       you'd want to do this post gtk_rc_parse().
     o Use gtk_widget_modify_bg (widget, GTK_STATE_INSENSITIVE, sensitive_bg)
       (and friends) to set the sensitive graphic state onto the insensitive state.

Cheers, with a first quick look to the documentation that will do the job...



--
-- Yiannis

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