Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2135

Summary: "Control '' has no parent window" error in LegendPaletteTool when default new canvas is GDI
Product: VCL TeeChart Reporter: yeray alonso <yeray>
Component: ToolsAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED WORKSFORME    
Severity: enhancement CC: david, johnnious
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
URL: https://www.steema.com/support/viewtopic.php?f=3&t=16547
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description yeray alonso 2018-12-20 04:42:41 EST
Steps to reproduce the error:

- Drop a TChart to the form
- Open the design time "Options" through the contextual menu.
  - Make sure "GDI" is selected as "Render" at the "New Chart" tab.
- Add this code at OnCreate:

  Chart1.Tools.Add(TLegendPaletteTool);

You don't need any series on the chart.

- Run and move the mouse over the chart.

Here the Call Stack:

:75811812 KERNELBASE.RaiseException + 0x62
:0047fb0f TWinControl.CreateWnd + $B3
:0047ffe0 TWinControl.CreateHandle + $1C
:0045f4eb TCanvas.RequiredState + $2B
TeCanvas.TTeeCanvas.SetInterCharSize(0)
TeCanvas.TTeeCanvas.DoChangedFont
TeCanvas.TTeeCanvas.AssignFontSize($263D130,8)
TeCanvas.TTeeCanvas.AssignFont($263D130)
TeEngine.TAxisItems.InitCalcRect
TeEngine.CheckMouse($25630B0)
TeEngine.ProcessAxis($25630B0,False)
TeEngine.TCustomAxisPanel.CheckMouseAxes(390,232)
Chart.TCustomChart.MouseMove([],390,232)
TeeLegendPalette.TLegendPaletteTool.ChartMouseEvent(cmeMove,mbLeft,[],390,232)
Chart.CheckList($2605180)
Chart.TCustomChart.BroadcastMouseEvent(cmeMove,mbLeft,[],390,232)
Chart.TCustomChart.MouseMove([],390,232)
:0047cf57 TControl.WMMouseMove + $83

A workaround could be to set "GDI+" as "Render" at the "New Chart" tab in the design time "Options", and then set the Chart to use GDI:

  Chart1.Canvas:=TTeeCanvas3D.Create;
Comment 1 david berneda 2023-03-15 15:19:13 EDT
Cannot reproduce. 
Changes in recent versions should have fixed this issue.