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]

 



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 Create a sample GtkToggleButton
    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.
    o gtk_widget_set_sensitive (widget, FASLE);

Cheers,
                       -Tristan

_______________________________________________

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