Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ASSIGN method
Message
 
À
26/09/1999 12:59:20
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00267357
Message ID:
00269109
Vues:
36
>Maybe you can describe a well defined case where it is usefull and can't be accomplished in another easy way. Maybe you can convince me i'm wrong...

PMFJI, I have an example, don't know if it's good or bad but here goes.

I created a ShadowText class, It's a container that holds 2 label objects. The label's are on top of each other, one is black and one is grey (it makes a text label with a drop shadow).

The container has a .Caption property that controls the caption of each label. This property has a .Caption_assign method.
LPARAMETERS vNewVal
WITH THIS
	.Caption = m.vNewVal
	.stText.CAPTION = m.vNewVal
	.stShadow.CAPTION = m.vNewVal
	.refresh
ENDWITH
In order to change the text I just set the .Caption property and the labels captions are changed.

It's nice and encapsulated, I don't have to know anything about the inner workings, just that I set the .Caption prop just like any other label.
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform