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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...