Resize Teechart
Posted: Mon Aug 29, 2011 6:15 am
What is the best way to resize a teechart containing and opengl 3d canvas?
If I resize the 3d opengl teechart in the form_sizechanged event the teechart crashes.
Points1.Chart.Aspect.View3D = True
Points1.Chart.Walls.Visible = True
Points1.Chart.Aspect.Orthogonal = False
Points1.Chart.Aspect.Chart3DPercent = 100
Points1.Chart.Aspect.Zoom = 50
Points1.Chart.Aspect.View3D = True
Rotate1.Active = True
Steema.TeeChart.Drawing.TeeBase.TeeOpenGL.Active = True
TChart1.Dock = DockStyle.None
TChart1.Height = Me.ClientSize.Height - ToolStrip1.Height - MenuStrip1.Height
TChart1.Width = TChart1.Height
Points1.Chart.Aspect.Height3D = Me.ClientSize.Height - ToolStrip1.Height - MenuStrip1.Height
Points1.Chart.Aspect.Width3D = Points1.Chart.Height
If I disable 3D before resizing, the teechart draws correctly. However, when I enable opengl, the 3d opengl is not resized correctly.
Steema.TeeChart.Drawing.TeeBase.TeeOpenGL.Active = False
Points1.Chart.Aspect.View3D = False
Points1.Chart.Walls.Visible = False
Rotate1.Active = False
A windows native 3d teechart resizes correctly using similar code.
If I resize the 3d opengl teechart in the form_sizechanged event the teechart crashes.
Points1.Chart.Aspect.View3D = True
Points1.Chart.Walls.Visible = True
Points1.Chart.Aspect.Orthogonal = False
Points1.Chart.Aspect.Chart3DPercent = 100
Points1.Chart.Aspect.Zoom = 50
Points1.Chart.Aspect.View3D = True
Rotate1.Active = True
Steema.TeeChart.Drawing.TeeBase.TeeOpenGL.Active = True
TChart1.Dock = DockStyle.None
TChart1.Height = Me.ClientSize.Height - ToolStrip1.Height - MenuStrip1.Height
TChart1.Width = TChart1.Height
Points1.Chart.Aspect.Height3D = Me.ClientSize.Height - ToolStrip1.Height - MenuStrip1.Height
Points1.Chart.Aspect.Width3D = Points1.Chart.Height
If I disable 3D before resizing, the teechart draws correctly. However, when I enable opengl, the 3d opengl is not resized correctly.
Steema.TeeChart.Drawing.TeeBase.TeeOpenGL.Active = False
Points1.Chart.Aspect.View3D = False
Points1.Chart.Walls.Visible = False
Rotate1.Active = False
A windows native 3d teechart resizes correctly using similar code.