Grab_Default

View: New views
3 Messages — Rating Filter:   Alert me  

Grab_Default

by Manuel Op de Coul :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I'm looking for the opposite function to Gtk.Widget.Grab_Default, i.e.
the one that unsets a widget as default widget.
Thanks in advance,

Manuel



-----------------------------------------------------------------
The information contained in this message is confidential and 
intended for the addressee only. If you are not the intended 
recipient, please notify the sender immediately and delete the 
message. Any unauthorised use, dissemination of information or 
copying of this message is prohibited. Views represented in this 
email are not necessarily those of E.ON Benelux. Internet e-mail 
is subject to risks. E.ON Benelux therefore declines any 
responsibility for damages from the use of internet e-mail.
-----------------------------------------------------------------

_______________________________________________
gtkada mailing list
gtkada@...
http://lists.adacore.com/mailman/listinfo/gtkada

Re: Grab_Default

by Emmanuel Briot :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Monday 06 August 2007 10:29:37 Manuel Op de Coul wrote:
> I'm looking for the opposite function to Gtk.Widget.Grab_Default, i.e.
> the one that unsets a widget as default widget.
> Thanks in advance,

You might be able to do a Grab_Default on another widget, which will still the
default set on the original widget.
If that isn't what you want (for instance because you do not want a default
widget -- not recommended according to most GUI guidelines I am aware of),
you might be able to do it with:

  Gtk.Object.Unset_Flags (Button, Gtk.Widget.Can_Default);

regards
Emmanuel
_______________________________________________
gtkada mailing list
gtkada@...
http://lists.adacore.com/mailman/listinfo/gtkada

Re: Grab_Default

by Manuel Op de Coul :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Emmanuel wrote:
> If that isn't what you want (for instance because you do not want a default
> widget -- not recommended according to most GUI guidelines I am aware of),


According to the GNOME Human Interface Guidelines 2.0 it's allowed, on page 82:

"Once a dialog is displayed, do not change its default button from one button to another. You
may add or remove default status from the same button if it helps prevent user error, however.
Changing the default from one button to another can be confusing and inefficient, especially
for users relying on assistive technologies."

> Gtk.Object.Unset_Flags (Button, Gtk.Widget.Can_Default);

Thanks, that will work. I expected there to be a way without affecting this flag though.

Manuel



-----------------------------------------------------------------
The information contained in this message is confidential and 
intended for the addressee only. If you are not the intended 
recipient, please notify the sender immediately and delete the 
message. Any unauthorised use, dissemination of information or 
copying of this message is prohibited. Views represented in this 
email are not necessarily those of E.ON Benelux. Internet e-mail 
is subject to risks. E.ON Benelux therefore declines any 
responsibility for damages from the use of internet e-mail.
-----------------------------------------------------------------

_______________________________________________
gtkada mailing list
gtkada@...
http://lists.adacore.com/mailman/listinfo/gtkada
LightInTheBox - Buy quality products at wholesale price