Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is equivalent of setting _CUROBJ = 1
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00356601
Message ID:
00356607
Views:
17
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
Previous
Reply
Map
View

Click here to load this message in the networking platform