Jump to content
Software FX Community

Adding charts at runtime

User (Legacy)

Recommended Posts

I am trying to add charts at runtime.  When I do, I can see the chart and

it's properties in the immediate window, but I can't see it anywhere on the

form. Here is my code:

Private Sub AddChart()

Dim intTabCount As Integer

Dim cfx As ChartfxLibCtl.ChartFX

If frmCube.mbolChartCreated Then

sstChartTab.Tabs = sstChartTab.Tabs + 1

intTabCount = sstChartTab.Tabs

sstChartTab.Tab = IIf(intTabCount - 1 > 0, intTabCount - 1, 0)

Set cfx = Controls.Add("ChartFX.Chart.4", _

"cfxChart" & intTabCount, sstChartTab)

'Set cfx = Controls(Controls.Count - 1)

cfx.TOp = cfxChart.TOp

cfx.Left = cfxChart.Left

cfx.Width = cfxChart.Width

cfx.Height = cfxChart.Height

cfx.Enabled = True

cfx.Visible = True

'Set cfx.Container = sstChartTab

'cfxChart.Visible = False

frmCube.objCharting.ChartData Controls(Controls.Count - 1),


'cfx.hWnd = sstChartTab.hWnd


Set cfx = Me.cfxChart

frmCube.objCharting.ChartData cfx, frmCube.ac

End If

frmCube.mbolChartCreated = True

End Sub

Is it my code or is it a problem with Chartfx 98

Any help would be appreciated


Daniel Reber

Datamasters, Inc

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...