View Issue Details

IDProjectCategoryView StatusLast Update
0002194JEDI VCL00 JVCL Componentspublic2004-10-05 11:33
ReporteranonymousAssigned Touser72 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.00 BETA 2 
Target VersionFixed in Version3.00 RC 1 
Summary0002194: TJvgSpeedButton creates its own TCanvas
DescriptionTJvgSpeedButton 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.
TagsNo tags attached.

Activities

user72

2004-10-04 23:41

  ~0005298

- 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?

glchapman

2004-10-05 06:02

reporter   ~0005308

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).

user72

2004-10-05 11:22

  ~0005314

>I changed that to "property Canvas;"
Sorry, that was what I meant.

user72

2004-10-05 11:33

  ~0005319

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