Re: Read-only controls



Pierre Wieser wrote:
Hi,

Is there a standard Gtk way of defining controls as read-only at runtime ?

In my user interface, I have entries, radio and toggle buttons, and
a combo list ; I would set them as read-only when the current item
cannot be updated for a reason or another.

For now, I set all these controls as insensitive, but there is a real
semantic difference between "a field is not available - doesn't make
sense here" and "a field cannot be modified", and I'd wish my UI
reflects this difference.

What should I do for that ?


Entries: gtk_entry_set_editable()

For buttons, radios, and other items, setting them to insensitive should be the appropriate thing to do. If you don't feel the same way though, you can set callbacks on the buttons, radios, etc. and just not do any of the actions the widgets would do.



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