Rectangle Tool on a SubChart?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
JayG
Newbie
Newbie
Posts: 71
Joined: Mon Sep 04, 2006 12:00 am

Rectangle Tool on a SubChart?

Post by JayG » Tue Oct 02, 2007 8:04 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Oct 03, 2007 9:47 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply