Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Focus problem
Message
 
 
À
29/06/1999 10:40:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00234800
Message ID:
00235377
Vues:
28
Well, it was just a bare-bones example. You could fancy-it up a bit by checking to see if the control actually has a TabIndex property and a SetFocus method first, etc. A label has a TabIndex but no SetFocus.

>Execellant! (cut, paste, done!)
>
>>You can loop the the container's Controls collection to check the TabIndex property.
>>for i = 1 to This.ControlCount
>>   if This.Controls(i).TabIndex = 1
>>      This.Controls(i).SetFocus()
>>      Exit
>>   endif
>>endfor
>>
>>>This sounds really useful... Especially in my own pageframe control. Is there a way to make the line generic? I mean, search the pageframe to find the control with the lowest tab stop and move the focus to that?
>>>
>>>>Hi Mark,
>>>>
>>>>>> I put a pageframe on my form and now when my form appears a focus sets on the first page. I want that focus sets on the first control on my page (text box). So, how can I do that? Do I need to put some code into áctivate method of my form or I can do it in design time?
>>>>>>
>>>>>> Thanks in advance
>>>>>
>>>>>That's what I would do. This.PageFrameName.Page1.txtBoxName.SetFocus()
>>>>
>>>> Ok, I did this in Form.Init method and PageFrame.Click.
>>>> Works fine.
>>>>
>>>>
>>>> Thank you.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform