Scrolling inverted legend positioned on top crashes
Posted: Fri Jun 27, 2025 1:44 pm
Hi,
We are using TeeChart of 4.2020.5.25 version, but the same problem is also reproducible on 2015 version and more recent one, used in TeeChartOffice demonstration executable.
To reproduce the crash:
- Set the legend position to Top or Bottom;
- Make it Inverted;
- Add Legend Scrollbar tool;
- Add enought data to see the scrollbar. The more the better (the slider should take less than half of available spaced).
- Scroll to the right until crash occurs.
We also noticed that when legend is inverted, scrolling step is doubles - slider is moved by legend items instead of 1.
Here is the call stack:
TeeChart.dll!Steema.TeeChart.Legend.DrawLegendItem(int ItemIndex, int ItemOrder) Unknown
> TeeChart.dll!Steema.TeeChart.Legend.DrawItems() Unknown
TeeChart.dll!Steema.TeeChart.Legend.Paint(Steema.TeeChart.Drawing.Graphics3D g, System.Drawing.Rectangle rect, bool doDraw, bool doCalc) Unknown
TeeChart.dll!Steema.TeeChart.Chart.DoDrawLegend(ref System.Drawing.Rectangle tmp, bool doDraw, bool doCalc) Unknown
TeeChart.dll!Steema.TeeChart.Chart.DrawTitlesAndLegend(System.Drawing.Graphics g, ref System.Drawing.Rectangle tmp, bool BeforeSeries) Unknown
TeeChart.dll!Steema.TeeChart.Chart.InternalDraw(System.Drawing.Graphics g, bool noTools) Unknown
TeeChart.dll!Steema.TeeChart.TChart.Draw(System.Drawing.Graphics g) Unknown
TeeChart.dll!Steema.TeeChart.TChart.OnPaint(System.Windows.Forms.PaintEventArgs pe) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.PaintWithErrorHandling(System.Windows.Forms.PaintEventArgs e, short layer) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.WmPaint(ref System.Windows.Forms.Message m) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m) Unknown
System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam) Unknown
We are using TeeChart of 4.2020.5.25 version, but the same problem is also reproducible on 2015 version and more recent one, used in TeeChartOffice demonstration executable.
To reproduce the crash:
- Set the legend position to Top or Bottom;
- Make it Inverted;
- Add Legend Scrollbar tool;
- Add enought data to see the scrollbar. The more the better (the slider should take less than half of available spaced).
- Scroll to the right until crash occurs.
We also noticed that when legend is inverted, scrolling step is doubles - slider is moved by legend items instead of 1.
Here is the call stack:
TeeChart.dll!Steema.TeeChart.Legend.DrawLegendItem(int ItemIndex, int ItemOrder) Unknown
> TeeChart.dll!Steema.TeeChart.Legend.DrawItems() Unknown
TeeChart.dll!Steema.TeeChart.Legend.Paint(Steema.TeeChart.Drawing.Graphics3D g, System.Drawing.Rectangle rect, bool doDraw, bool doCalc) Unknown
TeeChart.dll!Steema.TeeChart.Chart.DoDrawLegend(ref System.Drawing.Rectangle tmp, bool doDraw, bool doCalc) Unknown
TeeChart.dll!Steema.TeeChart.Chart.DrawTitlesAndLegend(System.Drawing.Graphics g, ref System.Drawing.Rectangle tmp, bool BeforeSeries) Unknown
TeeChart.dll!Steema.TeeChart.Chart.InternalDraw(System.Drawing.Graphics g, bool noTools) Unknown
TeeChart.dll!Steema.TeeChart.TChart.Draw(System.Drawing.Graphics g) Unknown
TeeChart.dll!Steema.TeeChart.TChart.OnPaint(System.Windows.Forms.PaintEventArgs pe) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.PaintWithErrorHandling(System.Windows.Forms.PaintEventArgs e, short layer) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.WmPaint(ref System.Windows.Forms.Message m) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m) Unknown
System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam) Unknown