Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Activecontrol in container puzzle
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00080275
Message ID:
00080340
Views:
24
>I have this grid within a container in a form. I'd like to control the exit from the grid through the keyboard, like when the user presses enter, the current record in the cursor underlying the grid is selected and further action can be taken.
>
>You do that through the keypress method of the form. You need to overwrite default behaviour for the grid that is in the container. You'd think that when the focus is on the grid, the thisform.activecontrol.name would return the name of the container. Wrong: it returns the name of the grid.
>
>Bug or feature by design?
>
>Marc

IMHO, by design - the active control is by definition the control with focus, no matter how many layers of containers, pageframes etc. are between the control and 'thisform'.

In this case would it be simpler to put code into each column's textbox Keypress event?

Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform