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 2290

Summary: TeeChart stops redrawing after call of Canvas.TextExtent of child Label
Product: VCL TeeChart Reporter: Olga <olgarulez>
Component: ChartAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED NOTABUG    
Severity: enhancement    
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:
Attachments: Sample project. Chart stops redrawing after click on button1.

Description Olga 2020-02-16 22:04:05 EST
Created attachment 929 [details]
Sample project. Chart stops redrawing after click on button1.

We migrate from Delphi7 to RAD Studio 10.3. In our project we use custom labels. The paint method is overriden. We draw on canvas of label, and we use Label.Canvas.TextExtent to calculate the size of text in CanResize method.
The parent of label is TChart.
In Delphi7 all work correct, but in Delphi 10.3 chart stops redrawing after first call of Label.Canvas.TextExtent.

I created sample project with standard TLabel to show the problem. After click on button Chart stops redrawing. (You can minimize and maximize form, and you will see the background instead of chart contents).

Is it bug or incorrect use of label canvas?

Versions:

Embarcadero® Delphi 10.3 Version 26.0.36039.7899

TeeChart Standard v2020.29.200113 32bit VCL (trial)

My OS is Windows 7 Ultimate ServicePack1
Comment 1 Olga 2020-02-25 22:15:27 EST
It is not valid to use a TLabel.Canvas outside of an actual paint operation.