mnemonic labels (was Re: Remove spaces in dialog window)
- From: muppet <scott asofyet org>
- To: Beast <beast i6x org>
- Cc: gtk-perl-list gnome org
- Subject: mnemonic labels (was Re: Remove spaces in dialog window)
- Date: Thu, 4 Aug 2005 08:22:45 -0400
On Aug 4, 2005, at 12:59 AM, Beast wrote:
Whats the usefullness of using new_with_mnemonic in Label, since
afaik Gtk2::Label is readonly widget.
You can set the label to be the mnemonic for another widget.
# new() is aliased to new_with_mnemonic() in the perl bindings:
$label = Gtk2::Label->new ('_User Name');
$entry = Gtk2::Entry->new;
# set $label to be the mnemonic for $entry
$hbox = Gtk2::HBox->new;
$hbox->pack_start ($label, FALSE, FALSE, 0);
$hbox->pack_start ($entry, TRUE, TRUE, 0);
This sets things up so that when the user activates the mnemonic Alt
+u (in $entry), the keyboard focus goes to $entry.
gtk_button_new_with_mnemonic() and the like essentially do this for
you. For separate widgets, you have to do it by hand.
I bring the rock, and provided it is fiscally responsible, I will
bring the funk as well. And that's fo-shizzle.
-- Saturday Night Live
] [Thread Prev