Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Graphing
Message
From
31/12/2006 18:29:41
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01181071
Message ID:
01181144
Views:
8
Thank you, young fellow.
I'm going to work on my violin for a while and think about coding while I whittle.
Happy new year.


Grady, here's some code I scraped to play with with. When you run it, you can read write and run MSChart properties and methods from the command window! Autocomplete and the VFP command window has revolutionalized the ways we can work with objects. It's better than VB Script Help *g.
>
>. Right clicking the chart will roll through the first nine or ten chart types.
>
>Ya know, some really cool presentation snap-ons could be built with MS Chart and VFP. Finally my VFP 9 arrives in a few days - can't wait - it is parsecs beyond 8 - and 8 ain't no slouch!
>
>Run it - then enter in the command window:
>myform.cntChart.ocxChart.footnote="My MSChart FootNote!"
*utChart.PRG (Terry)
>PUBLIC myform as Form, nChartType as Integer
>nChartType=0
>myform=CREATEOBJECT('frmChartClass')
>myform.show
>
>DEFINE CLASS frmChartClass as form
>height=600
>width=800
>autocenter=.t.
>caption=[MSChart (RightClick to Change Type)* ]+PROGRAM()
>PROCEDURE release
>this.queryunload
>ENDPROC
>PROCEDURE init
>this.resize
>ENDPROC
>PROCEDURE QueryUnload
>CLEAR EVENTS
>RELEASE ALL
>ENDPROC
>PROCEDURE resize
>WITH this
>.cntChart.resize(.height,.width)
>ENDWITH
>ENDPROC
>ADD OBJECT cntChart as cntChartClass
>visible =.t.
>ENDDEFINE
>
>DEFINE CLASS cntChartClass as Container
>top = 0
>left=0
>backstyle=1
>borderwidth=0
>backstyle=0
>PROCEDURE Init
>cntChartInit(this)
>ENDPROC
>PROCEDURE resize (nFormHeight,nFormWidth)
>WITH this
>.height=nFormHeight
>.width=nFormWidth
>.ocxChart.width=IIF(.Width>2,.width-2,2)
>.ocxChart.height=IIF(.Height>2,.Height-2,2)
>ENDWITH
>ENDPROC
>ADD OBJECT ocxChart as ocxChartClass
>ENDDEFINE
>
>define class ocxChartClass as Olecontrol
>OleClass="MSChart20Lib.MSChart.2"
>BorderStyle=1
>top=1
>left=1
>PROCEDURE mouseup (button, shift, x, y)
>IF button=2
>   this.ChartType = nChartType
>   nChartType=IIF(nChartType+1>9,0,nChartType+1)
>ENDIF
>visible=.f.
>enddef && class cntToolBar as Container
>
>PROCEDURE cntChartInit(oCnt)
>with oCnt.ocxChart
>.ChartType = 1
>.COLUMNCOUNT = 8
>.RowCount = 8
>.Backdrop.Fill.Style= 1  && VtFillStyleBrush
>   with .Backdrop.Fill.Brush.FillColor
>   .red=255
>   .green=255
>   .blue=255
>   ENDWITH &&.Backdrop.Fill.Brush.FillColor
>*!* Populate the DataGrid Object.
>FOR lnCol = 1 TO 8
>FOR lnRow = 1 TO 8
>.COLUMN = lnCol
>.ROW = lnRow
>.DATA = lnRow * 10
>NEXT ROW
>NEXT COLUMN
>.ShowLegend = .T.
>.visible=.t.
>ENDWITH &&oCnt.ocxChart
>ENDPROC
>* END utChart (terry)
I ain't skeert of nuttin eh?
Yikes! What was that?
Previous
Reply
Map
View

Click here to load this message in the networking platform