Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pass an array to a property
Message
From
01/07/2002 08:34:20
 
 
To
01/07/2002 07:51:23
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00672833
Message ID:
00673814
Views:
23
if I use the repinat property how can I say to Mschart he has to repaint the chart again.
is it something like this or is there a method (I can't find one) ?
thisform.mschart.repaint=.F.
**fill the charg with data
thisform.mschart.repaint=.T.
if thisform.mschart.rowcount>0 and thisform.mschart.clomuncount>0
thisform.mschart.row=1
thisform.mschart.column=1
thisform.mschart.data=thisform.mschart.data
endif
>You can use the repaint property to stop this.
>
>Mace
>
>>Because, (If I'm not wrong)
>>everytime you set a datapoint from the MSChart-object, MSchart is repainting the Graph; if you set the it with an array the chart is painted in one time.
>>
>>I'm not sure about this because I can't test it.
>>>>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.
>>>>>
Previous
Reply
Map
View

Click here to load this message in the networking platform