Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro substitution for properties?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00221190
Message ID:
00221194
Views:
17
>I have a variable that holds a column number and I would like to refer to a grids column via this variable.
>
>ie grdX.column(variable).controlsource = x
>
>This does not work....How can I accomplish this?

One way is to use the grid.columns() array, like

mygrid.columns(3).controlsource = x

also, you can make a string and use macro:

cMacro = "mygrid.column" + alltrim(str(myvar)) + ".controlsource = x"
&cMacro

adjusting myvar for whatever type it is...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform