Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pass an array to a property
Message
De
01/07/2002 07:28:33
 
 
À
01/07/2002 05:44:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00672833
Message ID:
00673791
Vues:
17
>Still no tricks.
>
>But, why don't you just create a wrapper method on your wrapper class?
>This is quite a clean solution.
>
>Eg:
>
>LOCAL loObject AS oleChart
>LOCAL loForm AS Form
>LOCAL laMyArray[5]
>
>loForm = CREATEOBJECT( "FORM")
>loForm.NewObject( "oleChart", "oleChart")
>loObject = loForm.oleChart
>
>loObject.MySetData( @laMyArray)
>
>RETURN
>
>DEFINE CLASS oleChart AS OLEControl
> OLEClass = "MSChart20Lib.MSChart.2"
>
>PROCEDURE MySetData
>LPARAMETERS taDataArray
>LOCAL lnRow, lnColumn
>
>EXTERNAL ARRAY taDataArray
>
>THIS.ColumnCount = ALEN( taDataArray,2)
>THIS.RowCount = ALEN( taDataArray,1)
>
>FOR lnColumn = 1 TO THIS.ColumnCount
> FOR lnRow = 1 TO THIS.RowCount
> THIS.Column = lnColumn
> THIS.Row = lnRow
> THIS.Data = taDataArray[ lnRow, lnColumn]
> ENDFOR
>ENDFOR
>
>ENDDEFINE
>
>
>>Thanks for your reply,
>>I hope someone can help me and tell me if there's a trick for this, It would make my code (MsChart-wrapper) a lot cleaner.
>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform