Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding first in tab order?
Message
From
25/10/2000 13:54:03
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
25/10/2000 10:28:10
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00433840
Message ID:
00434201
Views:
33
>>Writing one method in the appropriate level form class isn't that bad. I'd also store this as a name reference instead of an object reference.
>
>In the framework I use, every container control has a method SetFocusToFirstControl or something like that takes care of that.
>
>But I never put to mcuh thought into it, so why would I have to SetFocus() to the first control of the tab order if it automatically starts up with focus there?
>
>Doesn't seem like it needs to be done.

Most of the time it doesn't, but if you're adding controls programmatically, jumping between pagest or doing some other hokey-pokey, you may need to do that. I've thought of keeping the name of (or an object referrence to) the control in a container-level (i.e. form, page etc) property, though that would introduce the need of a cleanup on release. OTOH, I don't exactly remember what happens if the control you try to shift the focus to gets disabled, invisible or tabstop=.f. meanwhile - I'm also using a framework which sort of takes care of that - does it automatically shift focus to the next available control or what.

So if this may be needed, it sure would take a method which would be called as needed. On a densely populated page it would probably eat some time, so maybe the idea of storing the control's name somewhere isn't that bad, and its downsides may be amended with some clever code in (all of the) controls' taborder_assign methods.

Whew, this looks just like more work :)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform