frogstarr78 / gtkdialog

Automatically exported from code.google.com/p/gtkdialog
GNU General Public License v2.0
0 stars 0 forks source link

Button_action_types example Disable button problem? #30

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In the example, if one clicks the Disable button, the entry box is grayed out.
But Refresh, Clear, And Fileselect still are able to write to the entry box 
while it is grayed out.

Original issue reported on code.google.com by johnmeye...@gmail.com on 2 Sep 2011 at 6:55

GoogleCodeExporter commented 8 years ago
Hi 8-bit

Gtkdialog's "enabled" is equivalent to GTK+'s sensitive="true".
Gtkdialog's "disabled" is equivalent to GTK+'s sensitive="false".

http://developer.gnome.org/gtk/2.24/GtkWidget.html#GtkWidget--sensitive

The "sensitive" property means "Whether the widget responds to input."

It's the same as any other GUI toolkit. Just because something is greyed out 
and not manipulatable by the user, it doesn't mean its properties can't be 
programmatically set.

If you design an application though it would make sense to disable the Refresh, 
Clear and Fileselect buttons at the same time as disabling the entry widget --  
try it yourself on the example.

Regards,
Thunor

Original comment by thunor...@hotmail.com on 2 Sep 2011 at 10:08

GoogleCodeExporter commented 8 years ago
Thank you for the explanation.  It makes sense. IOW, The Disable button in the 
example only disables direct user input and not the other buttons use of the 
entry box.

Original comment by johnmeye...@gmail.com on 2 Sep 2011 at 11:27

GoogleCodeExporter commented 8 years ago

Original comment by thunor...@hotmail.com on 3 Sep 2011 at 11:26

GoogleCodeExporter commented 8 years ago

Original comment by thunor...@hotmail.com on 6 Sep 2011 at 11:16