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

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

 





On 28/12/05, Yiannis <odysseus.lost@xxxxxxxxx> wrote:


On 28/12/05, Tristan Van Berkom < tristan.van.berkom@xxxxxxxxx> 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 ;-)



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.

GdkColor *sensitive_bg = widget->style.bg[GTK_STATE_NORMAL];

fails with the following error:
error: request for member `bg' in something not a structure or union

and the same error occurs with all the other members of the style structure....

Any ideas?


--
-- Yiannis
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux