Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set properties for multiple objects
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00368236
Message ID:
00368281
Views:
22
Hi Gerard,

Suppose the label caption is always the same as the field name for this particular label class (I'm assuming, you have your class for this kind of labels, have you?). In this case, you can try:
In label Init
local lcFieldName
lcFieldName=alltrim(this.caption) && Something like 'Fld1', 'Fld2', etc.
lcFieldName='myTable.'+lcFieldName && Now it's like MyTable.Fld1
this.tag=transform(evaluate(lcFieldName))
HTH


>I find myself in form design needing to do following quite a lot:
>
>1. I have set up a no. of fields on the form
>2. Now, I want to automatically set thr 'Tag' property of
> every 'label' field to the associated field's name
>
>e.g. My label fields are : Fld1,Fld2,Fld3,Fld4
>
>I then want the tag property of each of these fields to be:
> fld1,fld2,fld3,fld4 etc.
>
>Every time I set up a form, I have to go into each field manually and change the tag. I reckon there must be a better way...maybe using a builder but I have never used these .
>
>Thanks,
>
>Gerard
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform