Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid.Gotfocus()???
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00143667
Message ID:
00143679
Vues:
24
>Hi all,
>
>I am looking for an elegant way to programmatically keep track of whether any control in a grid has focus. I would like to expand the grid to display more rows when one of its controls has focus, and contract it again to save screen space when none of the controls on the form has focus.
>
>So far I have figured out a way of keeping track at the form level, but nothing self-contained withing the grid wihtout using a timer.
>
>Any suggestions would be greatly appreciated.
>
>regards,

Hi there,

IF 'any control in a grid' does not include Column Header object,you can determine current focus object by putting some code in each column's Textbox(or may any other control). Create one property on the Form and play with it.

e.g. In Grid.Column1.text1.GotFocus(),Put Thisform.lGridHasFocus = .T.
Same way in LostFocus(),Put Thisform.lGridHasFocus = .F.

Hope this helps

Bye
Jayesh
- Jayesh
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform