Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro substitution in object references?
Message
From
08/04/2005 10:23:08
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Macro substitution in object references?
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01002613
Message ID:
01002613
Views:
64
In order to populate a form with a variable number of labels and spinners I am trying to do something like the following:
_variety = "Cortland"
SELECT item,descrip FROM inventory WHERE variety = _variety INTO CURSOR _itemlist

ncnt = 1
SCAN
	ccnt = ALLTRIM(STR(ncnt))
	mlbl = "lbl"+ccnt
	mspn = "spn"+ccnt
	thisform.AddObject(mlbl,"label")
	thisform.AddObject(mspn,"spinner")
	thisform.&mslbl.caption = _itemlist.item + " " + _itemlist.descrip
	thisform.&mslbl.visible = .t.
        ncnt = ncnt + 1

endscan
Obviously, the macro substitution doesn't work in this instance. Can anybody offer me a nudge in the right direction to achieve what I'm trying to do?

Thanks in advance!

Andrew
On a CLEAR day you can see forever.
Next
Reply
Map
View

Click here to load this message in the networking platform