Re: How to Add a Keyboard Accelarator to a Button



On Fri, 22 Jun 2001, Liviu BURCUSEL wrote:

Shlomi Fish wrote:

Hi!

I have a button in one of my dialogs and I want it to have a keyboard
accelarator. I.e: I want one of its letters to be underlined, and if the
user presses Alt+[Letter] or whatever is the GNOME convention, it will be
pressed automagically.

my $button = Gtk::Button->new('_Whatever');

... and this makes W as shortcut ...


I tried it. It does not work. All I get is a button that displays the
string "_Whatever", with an underscore at the beginning.

Regards,

        Shlomi Fish
 
Liviu

 

I have already did that to the menus, but I don't have Gtk::ItemFactory
for buttons. I know it is possible because a Glade dialog I generated (in
C) uses it. I cannot convert the dialog to perl because Perl-Glade is
broken, and fails on very simple dialogs

Furthermore, I could not find an accelarated button in the Perl/Gtk+
examples. Keyboard integration is very important for usability and
accessibility so we should at least have some working code.

Regards,

        Shlomi Fish

_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list




----------------------------------------------------------------------
Shlomi Fish        shlomif vipe technion ac il 
Home Page:         http://t2.technion.ac.il/~shlomif/
Home E-mail:       shlomif techie com

A more experienced programmer does not make less bugs. He just realizes
what went wrong more quickly.





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