Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppress Tab Key in Window

Status
Not open for further replies.

DaveHelmut

Programmer
Mar 18, 2002
3
US
Hi,

I am using PB 7.

I have a window with an OLE control on it. I need to suppress the Tab key from within the window::Key event.

Problem is, the Tab key never causes control to enter the Key event.

There are no dataWindows. Any ideas on how I can 'capture' the Tab key in a window object?

Thanks!
 
Did you try to create a user event with the keydown event??



 
Cucho,

There is no keydown event on the Window object (unless i am missing something obvious).

My problem is that I need to suppress the Tab key from the scope of the Window object, the Window object only has the ::Key event (no keydown), and the ::Key event does not fire when I press the Tab key.

If you need more info, lemme know.


Thanks,

Dave
 
Dave,

You can create a new keydown event. Name it ue_keydown and use the event id of pbm_keydown to trap the Tab key. If you haven't already figured out how to work around this yet, try that and see what happens.

HTH

Dan
 
Hi Dan,

Yes I did this, thank you for the good advice. It did not work, however.

You see, pressing the [Tab] key will not take you into _any_ key* event.

The only event that pressing [Tab] takes you to is the infamous "other" event.

This is PB7, BTW.

It is possible I am missing something. Any other ideas?

Thanks!

Dave
 
There are some events which get captured by controls within a window. If you need to code for this event, you will have to code in some event for the control (in your case the OLE control).

Otherwise on press of tab key, key event does get generated. You can check it out by creating a window with no controls in it (not even OLE) and write the following code in the key event for window

if key = keytab! then
messagebox('key','tab')
else
messagebox('key','other')
end if

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top