Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002194 [JEDI VCL] 00 JVCL Components minor always 2004-10-04 09:36 2004-10-05 11:33
Reporter anonymous View Status public  
Assigned To user72
Priority normal Resolution fixed  
Status resolved   Product Version 3.00 BETA 2
Summary 0002194: TJvgSpeedButton creates its own TCanvas
Description TJvgSpeedButton inherits from TGraphicControl; thus, it inherits the TControlCanvas allocated there. However, it allocates its own TControlCanvas anyway, and uses it for painting. By using its own canvas, the canvas does not get the DC handle set by TGraphicControl.WMPaint, which means, among other things, it does not paint correctly if the owning control uses DoubleBuffered = true.
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0005298)
user72
2004-10-04 23:41

- Remove the FCanvas:TCanvas field in the class
- Remove the GetCanvas function
- change "property Canvas:TCanvas read GetCanvas;" to "property Canvas:TCanvas;"
- Remove the FCanvas := TControlCanvas.Create etc from the constructor
- Remove FCanvas.Free from the destructor
- Rename all "FCanvas" to "Canvas"

Does it work as before?
(0005308)
glchapman (reporter)
2004-10-05 06:02

No -- which is a good thing. It now renders correctly when placed on a DoubleBuffered panel. Otherwise, I don't notice any changes.

By the way, you have:

- change "property Canvas:TCanvas read GetCanvas;" to "property Canvas:TCanvas;"

I changed that to "property Canvas;" -- without type or accessors, just made it public, which seems more idiomatic to me (does a typed redeclaration without accessors allow access to the property?)

Also, I am the original reporter (I forgot to log in).
(0005314)
user72
2004-10-05 11:22

>I changed that to "property Canvas;"
Sorry, that was what I meant.
(0005319)
user72
2004-10-05 11:33

Updated in CVS

- Issue History
Date Modified Username Field Change
2004-10-04 09:36 anonymous New Issue
2004-10-04 23:41 user72 Note Added: 0005298
2004-10-04 23:41 user72 Status new => feedback
2004-10-05 06:02 glchapman Note Added: 0005308
2004-10-05 11:22 user72 Note Added: 0005314
2004-10-05 11:33 user72 Status feedback => resolved
2004-10-05 11:33 user72 Resolution open => fixed
2004-10-05 11:33 user72 Assigned To => user72
2004-10-05 11:33 user72 Note Added: 0005319


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker