Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
My wish to VFP 7.0
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00484748
Message ID:
00485501
Vues:
9
>>>I'm sorry, I can't envision that. Usually I can use eval() to get the object >reference.
>>>Can you give me an example?
>>
>>Sure:
>>
>>
>>Lets say I'm wanting to set the color of a shape in a graphical
>>representation of some data. I have a mask to tell me what to do...
>>
>>for lnCnt = 1 to SliderPosition
>> for lnCnt2 = 1 to SomeNumberOfShapes
>>   if occurs("T", lcCurMask) > 0
>>     lcCommand = "this.Object"+allt(str(lnCnt-lnSlider+1))+;
>>	         ".shape"+allt(str(lnCnt2))+".visible = .T."
>>     &lcCommand
>>     lcCommand = "this.Object"+allt(str(lnCnt-lnSlider+1))+;
>>		 ".shape"+allt(str(lnCnt2))+".backcolor = rgb(0,255,0)"
>>     &lcCommand
>>   endif
>> endfor
>>endfor
>>
>>
>>
>>The example is not complete but basically I'm setting the visible and color properties of a row of shapes in an object based on the count minus the position of a slider control plus one. :)
>
>In this case you can use name expression
>
>STORE .T. TO ( "this.Object"+allt(str(lnCnt-lnSlider+1))+;
>	         ".shape"+allt(str(lnCnt2))+".visible )
>STORE rgb(0,255,0) TO ("this.Object"+allt(str(lnCnt-lnSlider+1))+;
>		 ".shape"+allt(str(lnCnt2))+".backcolor")
>
Yes, all three examples would work.
Eric Kleeman - EDS Consulting Services
MCP Visual FoxPro
MCSD C#.NET
Hua Hin Thailand
Los Angeles California
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform