Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A simple focus....
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00611318
Message ID:
00611324
Views:
20
Sergey,

You know, I thought the same thing, but it bailed when I just tested it. So I looked in the help file. Macro substition treates the contents of the var as a string literal. So having an object in there shouldn't work.

This works:
lcDefault = "Thisform." + thisform.cDefault.name
&lcDefault..SetFocus()
or am I missing something?

>Hi Ric,
>
>You need two dots. The first one denotes the end of the macro substitution.
IF !EMPTY(THISFORM.cDefault)
>  lcDefault = THISFORM.cDefault
>  &lcDefault..SetFocus()
>ENDIF
>
>
>>TIA to you all because this is a no brainer (I left mine at home today).... in certain situations I pass a default control name to a form property.... I want the form to select that control id as the next to get focus - overriding the tab order.... could some please tell me why this isn't working??
>>
>>IF !EMPTY(THISFORM.cDefault)
>> lcDefault = THISFORM.cDefault
>> &lcDefault.SetFocus()
>>ENDIF
>>
>>I know the answer is here somewhere, but not in my brain today... :-)
>>
>>Ric
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform