Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setall for label
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01247069
Message ID:
01247351
Views:
25
>>>>I have about 20 labels on a form for credits and thay are aptly named
>>>>LBLCREDIT1,LBLCREDIT2,......LBLCREDIT20 and all the captions are the same, the word "credit". I want to use setall to chg them to another caption, "AMT" for example. I do not want to mess with various other labels on this form however.
>>>
>>>Tim:
>>>
>>>Any chance you can sub-class the labels into something like "clsLblCredAmt"?
>>>
>>>That way you could simply
>>>Thisform.setall("caption","AMT","clsLblCredAmt")
>>>
>>>And avoid any problems with forcing a naming convention (not necessarily a bad idea but you could forget or mistype a name), loop counters, etc.
>>
>>Exactly. It would be much better to have a special class.
>
>You're right, I do have another label subclass but this form was created by a wizard.

Hi Timothy,

For cases like this I do manual hacking :) Make a backup of your form, then

use getfile('scx')
browse for baseclass = 'label'

and then replace class and classloc with your class and location for the library (relative) in the lower case.

AFAIK this Hack utility may be in Downloads already.
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