Re: How invoke a menu and menu items on key press



Am Mittwoch, den 04.01.2006, 23:09 -0800 schrieb Suresh Stephen:

          I need to know how to add a shortcut key for a menu so that
i can invoke that menu by pressing alt+<short cut key> and |||ly for
menu items also so when the menu is pooped i just want to press a key
and invoke a functionality also i want to know how u can underline
that a letter in the menu item name which we set as the short cut key.
 
 For example:
         a menu has a menu item exit i want 'x' to be its shortcut key
and 'x' must be underlined 
 Any help in this regard would be gr8

You can assign a mnemonic to an arbitrary menu item by using 
gtk_menu_item_new_with_mnemonic and passing "_Foo" instead of "Foo" as
item label. The letter after '_' will be used as mnemonic.
If you use GtkActions (recommended), the label field of your
GtkActionEntry should be set to "_Foo".

-- 
Christian Neumair <chris gnome-de org>


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