Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Thanks Barbara,
I am looking for something generic to put in the add button of the class. Was hoping something like ThisForm.CurrentObject = 1...
Will loop through objects on form looking at TabIndex.
Alex
>Generally in VFP you'd use SetFocus instead of _Curobj. But finding out which object should be the first may be a little trickier. If you happen to know the object and don't mind hardcoding it, you can just say [object name].SetFocus(). Another option would be to setup some custom properties for each page that stores the name of the object you want to get focus. Still another option is to loop through the Controls array for the current page (if you know you're in a pageframe), and look at the TabIndex property. That can be cumbersome because the object with a TabIndex of 1 may be a label, which can't receive focus, or you may not even have an object with a 1. So, then you'd have to look for the object with a TabIndex of 2, etc.
>
>>Hi,
>>
>>Within a navigation "thing" (a container with buttons that sits on a form) I need to activate the first object in the form (which may sit in a pageframe). What is the equivalent of Setting _CUROBJ = 1 in Fox 2.6 ?
>>
>>TIA,
>>
>>Alex
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement