Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid focus
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00367392
Message ID:
00367436
Views:
13
>I like interfaces that can be easily navigated without the mouse. I don't like the necessity of using Ctrl-Tab to exit a grid that is in the tab order. I have made text box classes that set focus to another control in their keypress events, and placed these controls in last or first grid columns. The problem is that if there are no records in the grid, the columns don't get focus and don't receive the keypress. The grid seems to have focus but shows no visual cue, and it has no keypress event. The debugger's event logging tells me that the grid.gotfocus never fires, but the grid.When and .Valid do. When I press Tab, no events occur.
>
>When the grid has no records, it doesn't need to be in the tab order at all, I think. It might be nice to have some refresh code that turns the grid.Tabstop on or off depending on whether there are records in it. What would be some nice, generic code I could put in my grid class, form class, or navigation control class that would handle this without making many assumptions about underlying cursors and things? Or is there a better way?



I'd say that a textbox is the wrong control to use in this situation. Command buttons are really what you should be using, and they shouldn't be inside the grid. With a command button, you can define a hot key that will fire the button's click method, and from there, you can set focus to whatever you want.
Previous
Reply
Map
View

Click here to load this message in the networking platform