1. Tab Key question and Win32lib

Hi,

I want to trap the tab key, VK_TAB, in onKeyPress[window] but it doesn't 
seem to be triggering. Does Windows or win32lib intercept the tab key 
when the control is a window before it gets to my routine?

Thanks,

Judith

new topic     » topic index » view message » categorize

2. Re: Tab Key question and Win32lib

Judith,
the standard is to trap the TAB kay and not pass it on to the keypress
handler.

There is a trick you can use though. It will mean that you will ahve to do
your own tab processing though.

If you do this ...

   VOID = setTabCodes(0)

then no key will cause tabbing between the controls - plus the TAB key gets
passed through to the keypress handler.

Alternatively, you could do ...

   VOID = setTabCodes(VK_F8)

to make the F8 key become the new tabbing key.


----- Original Message -----
From: "Judith" <camping at txcyber.com>
To: "EUforum" <EUforum at topica.com>
Sent: Wednesday, August 15, 2001 8:15 PM
Subject: Tab Key question and Win32lib


>
> Hi,
>
> I want to trap the tab key, VK_TAB, in onKeyPress[window] but it doesn't
> seem to be triggering. Does Windows or win32lib intercept the tab key
> when the control is a window before it gets to my routine?
>
> Thanks,
>
> Judith
>
>
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

3. Re: Tab Key question and Win32lib

>I want to trap the tab key, VK_TAB, in onKeyPress[window] but it doesn't
>seem to be triggering. Does Windows or win32lib intercept the tab key
>when the control is a window before it gets to my routine?
>
>Thanks,
>
>Judith

I wanted to do this once, and posted to the list asking about it, but got no 
reply.  So here's what I resolved to do.

Create an mle text and position it just outside the window, so it is not 
visible (preferably to the top or left).  When the window recieves focus, 
set the focus to the mle text.  Then recieve key events from the mle text 
box.  Mle text boxes don't intercept the tab key when pressed, so you can 
detect when tab is pressed.

hope that helps,
Daryl van den Bink

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu