Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid focus
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00367392
Message ID:
00367626
Vues:
12
I have noticed since I posted that grids ain't got a .GotFocus(). I just put
IF RECCOUNT(THIS.Recordsource) = 0
     RETURN .F.
ENDIF
in the Grid.When and it worked very well, with focus jumping neatly to the next control in the tab order. I assume that it works because I use parameterized views for all my grid cursors, and that it would not work for people who use relations instead.

Before asking, I looked at some old threads which answered some of my questions about grids and tab order, in particular threads #195446 and #220597. I know that there are others who don't like having to use Ctrl-Tab to leave a grid. I wonder how other people handle it.

>Bret,
>
>How about if in the case there is reccount() = 0 then just force control onto the appropriate control with a KEYBOARD lastkey() in the grid.GotFocus() (or maybe just RETURN .f. in the When() this may be the easiest thing to do) you might need a NODEFAULT
>
>>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?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform