Re: Event key problems
| From: | Steph | Date: | Thu, 09 Dec 2004 22:17:31 +0000 |
| Subject: | Re: Event key problems | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-5330@lists.php.net to get a copy of this message | ||
I don't have src handy to check this out, but it sounds like you're
effectively doing the same thing twice? What happens if you don't handle
it?
----- Original Message -----
From: "Madeleine D." <mmdrake@bctonline.com>
To: <php-gtk-general@lists.php.net>
Sent: Thursday, December 09, 2004 10:56 PM
Subject: [PHP-GTK] Event key problems
> 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.
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>