User (Legacy) Posted September 17, 2001 Report Share Posted September 17, 2001 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), frmCube.ac 'cfx.hWnd = sstChartTab.hWnd Else 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 Thanks Daniel Reber Datamasters, Inc Link to comment Share on other sites More sharing options...
Software FX Posted September 20, 2001 Report Share Posted September 20, 2001 You need to added to the form not to the global objects: For example: Set CFx = Form1.Controls.Add("ChartFX.Chart.4", "cfx") -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.