Page 1 of 1

Rectangle Tool on a SubChart?

Posted: Tue Oct 02, 2007 8:04 pm
by 9792387
I would like to use the rectangle tool on a subchart. However, it doesn't appear to work. Here is my code:

Code: Select all

SubTool = New Steema.TeeChart.Tools.SubChartTool(TChart1.Chart)
SubChart = SubTool.Charts.AddChart("WindowChart")
TChart1.Panel.MarginUnits = Steema.TeeChart.PanelMarginUnits.Pixels
TChart1.Panel.MarginBottom = 80
SubChart.Left = TChart1.Panel.MarginLeft
SubChart.Top = TChart1.Chart.Height - TChart1.Chart.Panel.MarginBottom
SubChart.Width = TChart1.Width - TChart1.Chart.Panel.MarginLeft - TChart1.Chart.Panel.MarginRight
SubChart.Height = 80
SubChart.Header.Visible = False
SubChart.Aspect.View3D = False
SubChart.Axes.Left.Visible = False
SubChart.Axes.Right.Visible = False
SubChart.Axes.Bottom.Visible = False
SubChart.Axes.Right.Automatic = False
SubChart.Axes.Right.AutomaticMaximum = True
SubChart.Axes.Right.Minimum = TChart1.Axes.Right.Minimum
SubChart.Axes.Right.Maximum = TChart1.Axes.Right.Maximum
SubChart.Panel.MarginUnits = Steema.TeeChart.PanelMarginUnits.Pixels
SubChart.Panel.MarginLeft = 0
SubChart.Panel.MarginRight = 0
SubChart.Panel.MarginTop = 0
SubChart.Panel.MarginBottom = 0
SubChart.Series.Add(New Steema.TeeChart.Styles.Line)
SubChart.Series(0).FillSampleValues()
If RectTool Is Nothing Then
    RectTool = New Steema.TeeChart.Tools.RectangleTool(SubChart.Chart)
    RectTool.Active = True
    RectTool.PositionUnits = Steema.TeeChart.PositionUnits.Pixels
    RectTool.Left = SubChart.Left
    RectTool.Top = SubChart.Top
    RectTool.Width = SubChart.Width
    RectTool.Height = SubChart.Height
    RectTool.Shape.Transparency = 50
    RectTool.Shape.Pen.Width = 2
    RectLastWidth = RectTool.Width
End If
I get the rectangle on the subchart, but when I put the mouse over it I can't drag it or resize it.

Jay

Posted: Wed Oct 03, 2007 9:47 am
by narcis
Hi Jay,

Thanks for the information. I've been able to reproduce the problem here and added it (TF02012489) to our defect list to be fixed for future releases.