Event key problems

From: Date: Thu, 09 Dec 2004 20:56:47 +0000
Subject: Event key problems
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-5329@lists.php.net to get a copy of this message
We have some problems dealing with the tab key in events. Env: Win98/WinNT, PHP-Gtk 1.0 We've been using the key_press_event to successfully trap a number of keys - like Functions, return, etc. Now we want to capture the GDK_KEY_tab. But, it is not working right. Using a simple $nextObj->grab_focus(), instead of moving to the next widget in our frame, it ends up exactly one widget past. Doesn't seem to matter if the next object is entry or button or whatever... Sample code below: calling widget: $address_2->connect_object('key_press_event', 'PMfieldEvent', 'address_2','mbrs','mbrs_addr',$zip_code,""); event function: function PMfieldEvent($event,$widget,$source,$destination,$next,$display) { // Working code if ($event->keyval == GDK_KEY_F4) { PMdbSearch($source,$destination,$next,$display); // New code added 12/3/04 } elseif ($event->keyval == GDK_KEY_tab) { $next->grab_focus(); } } //End field event process I've trapped the $event->keyval to verify that it is getting the tab call. I've also tried switching to the numeric 65289. No luck. Any suggestions? thanks, Madeleine D.

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