Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setall for label
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01247069
Message ID:
01247150
Vues:
20
>>>I have about 20 labels on a form for credits and thay are aptly named
>>>LBLCREDIT11,LBLCREDIT21,LBLCREDIT31......LBLCREDIT21 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.
>>
>>for lnI = 1 to 20
>>   store 'new caption' to ('thisform.lblCredit' + transform(m.lnI))
>>next
>>
>>If they are on a different pages, then it would be harder if they are not based on some extra class.
>
>Naomi, Upon re examine my labels are named following( my mistake)LBLCREDIT11,LBLCREDIT21,LBLCREDIT31, LBLCREDIT41....etc
>I have this line for testing
>abc=1
> store 'AMT' to ('thisform.lblCredit1' + transform(m.kkk))
>but it bombs out.

So, change the loop.

It should be

for lnI = 11 to 41 step 10 && (how many do you have?)
You may also check first for
type('thisform.lblCredit' + transform(m.kkk)+ '.name') = 'C' before attempting to set a property

I also seem to forget .Caption in my previous code, e.g.

store 'AMT' to ('thisform.lblCredit1' + transform(m.kkk) + '.Caption')
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform