Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keypress equiv. in Containers
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01145337
Message ID:
01145380
Views:
31
This message has been marked as a message which has helped to the initial question of the thread.
Hi,

>I want to intercept keys in a contianer.

There are several options depending on what you want to do:

1) You have a container that should respond to key strokes, but doesn't consist of input controls. Such a container could consists of labels, lines and images, only. Handling keys would be required to perform some sort of navigation, etc. In this case, i found the best solution, to add a button to the container and place it outside the visible area. If the container should not receive focus in the tab order, set the button's TabStop property to .F. By turning the button into an invisible button (Style property), you can use it as a focus indicator.

2) You have a collection of input controls inside the container and only need to respond to key strokes in all controls. In this case, binding to all controls using BINDEVENT() or adding code to call a HandleKeypress method would be a soltion.

3) Same as 2), but you need to surpress key strokes. In this case you have to write code into the KeyPress event of each control to call a method in the container. If the method returns .F., issue NODEFAULT to surpress the key.
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform