how to open menus with alt + .. ?

From: Date: Tue, 26 Jul 2005 00:28:40 +0000
Subject: how to open menus with alt + .. ?
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-6100@lists.php.net to get a copy of this message
Hi there, what I want is (should be ..) quite simple, use alt + f to open the "file" menu for example, however I've run into problems. Consider the following example: $menubar=&new gtkmenubar(); global $header; global $menu; $header = &new GtkMenuItem(""); $menubar->append($header); $menu = &new GtkMenu(); $header->set_submenu($menu); $alabel = $header->child; $_key = $alabel->parse_uline("_File"); $header->add_accelerator("activate", $accelgroup,$_key,GDK_MOD1_MASK,0); $header->connect("activate", 'show_menu'); function show_menu1(){ global $header;global $menu; # Alternatives: $header->activate(); // 0. #$menu->select_item($header); // 1. #$menu->activate_item($header,true); // 2. #$menu->set_active(1); // 3. #$menu->popup(null, null, 'position',0,0 ); // 4. #$header->select(); // 5. } Alternatives 0., 1. and 2. shutdown the application, 3. doesn't do anything, 4. opens the menu but not where it should, but at the mouse pointer position or, alternatively, at a position x,y on the screen defined by a function "position", 5. opens the menu but then you can't move into it because the downarrow key doesn't work. Any suggestions? Anthony

« previous php.gtk.general (#6100) next »