Re: How to forbid people to change GtkCheckButton's status manually?

On Wed, Aug 26, 2009 at 11:55:41AM -0500, Michael Cronenworth wrote:
Dave Howorth on 08/26/2009 04:00 AM wrote:

I'm surprised nobody has mentioned gtk_widget_set_sensitive()


Setting a FALSE sensitivity would be the normal thing to do that normal
users would expect to see.

I doubt the user expects to see a greyed check button as an indicator.

The OP's approach has the following flaws:
- It confuses the user because he sees a checkbutton and hence tries to
  change it.

While your improvement reduces the number of flaws to two:
- It confuses the user because he sees an insensitive checkbutton and
  hence tries to find another control that makes it sensitive to be able
  to change it.
- It is difficult to read because greyed out, hence hardly usable as an

A custom indicator, e.g. something like a green/red ball or whatever,
might be a better choice in some cases, as suggested.  However, in
other cases an indicator that looks like a check makes more sense.

If you want to be a "l33t" programmer and program a custom method for a
custom group of users then go on ahead. This kind of GUI development is
why your grandparents are so afraid to use the computer.

I cannot find the example code in your post that shows how to draw a
nice check-like indicator (probably with gtk_paint_check()) that is
consistent with the current Gtk+ theme.

Perhaps it was stripped by a SMTP server along the way.  Could your
please re-send it?


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