Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Focus problem
Message
From
29/06/1999 10:40:52
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00234800
Message ID:
00235242
Views:
23
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.
--Todd Sherman
-Wake Up! Smell the Coffee!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform