Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/VCL/Standard Controls/TButton    [ Add a report in this area ]  
Report #:  75246   Status: Closed
TButton renders incorrectly on glassframes, even with doublebuffering enabled
Project:  Delphi Build #:  12.0.3420.21218
Version:    12.3 Submitted By:   Erik Brandt
Report Type:  Basic functionality failure Date Reported:  6/25/2009 12:55:47 AM
Severity:    Serious / Highly visible problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    32 Bit Internal Tracking #:   270455
Resolution: Test Case Error (Resolution Comments) Resolved in Build: :
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: 6
Description
If you put a TButton on a glassframe part of a form, it does not render correctly.

If doublebuffering is disabled, which is the default, then the button itself is rendered correctly, but the label inside it is invisible. The text has a kind of white shadow, but you can't read what it says.

When doublebuffering is enabled, you can read the label, but all the way around the edge of the button, you get a black frame, which looks not so nice.

See attached project.
Steps to Reproduce:
Create a new VCL project
Set the GlassFrame.Enabled and GlassFrame.SheetOfGlass properties to True.
Drop two TButton on the form.
On the second button, set doublebuffering to True.

Build and run.

Expected - Button renders smoothly as on non-glassframe forms.
Actual - With doublebuffering disabled, the buttonlabel is invisible. With doublebuffering enabled, you get an ugly black edge around the button.
Workarounds
None
Attachment
GlassFrame.zip
Comments

CAS Developers at 7/27/2010 5:56:12 AM -
Still an issue on Delphi 2010. About time they fixed this.

Tomohiro Takahashi at 7/27/2010 6:27:03 PM -
I closed this report as 'Test Case Rrror', because internal trcking system already had closed this issue 1 year ago.
TForm needs to be DoubleBuffered for control to paint properly.

Warren Postma at 7/28/2010 11:08:51 AM -
Tomohiro Takahashi made an error closing this report.

setting DoubleBuffered does not Fix the error, it merely changes the glitch from one kind of glitch to another glitch.

REOPEN THIS PLEASE.

Tomohiro Takahashi at 8/2/2010 12:15:30 AM -
Hi, this report was closed as 'Test Case error', again. This QC report will be closed, too...

So, please wait for a comment from Internal Tracking System.

Tomohiro Takahashi at 9/6/2010 12:53:44 AM -
This is a comment from internal tracking system.
<<<<<<<<<<<<
With DoubleBuffered = False on the form:

Black borders = Test Case Error (set DoubleBuffered to True on the form)

With DoubleBuffered = True on the form:

White borders = Cannot Fix (Windows theme library doesn't paint button Caption in a way that's readable with GDI forcing VCL to make black opaque which prevents black from being used to make the border transparent)

Solution: Use TBitBtn instead.
>>>>>>>>>>>>

Erik Brandt at 8/27/2010 2:19:06 AM -
Unfortunatly I am not up to date with the latest editions of Delphi, so I can not verify whether or not this works.

Server Response from: ETNACODE01