Log On
Embarcadero Home
Watch, Follow, &
Connect with Us
Share This
QualityCentral
Communities
Articles
Blogs
Resources
Downloads
Help
QualityCentral
Delphi-BCB
VCL
Additional Controls
Action Bar Controls
TBevel
TBitBtn
TButtonedEdit
TCheckListBox
TColorBox
TControlBar
TDrawGrid
TImage
TLabledEdit
TMaskEdit
TScrollBox
TShape
TSpeedButton
TSplitter
TStaticText
TStringGrid
TValueListEditor
You are not logged in.
Help
Print
Public Report
Report From:
Delphi-BCB/VCL/Additional Controls/TBitBtn
[ Add a report in this area ]
Report #:
92149
Status:
Closed
When changed Windows theme (Classic) at runtime while application is running, the image of TBitBtn is vanished.
Project:
Delphi
Build #:
15.0.3953.35171
Version:
15.1
Submitted By:
Hideaki Tominaga
Report Type:
Basic functionality failure
Date Reported:
3/9/2011 2:34:45 AM
Severity:
Serious / Highly visible problem
Last Updated:
3/20/2012 2:24:39 AM
Platform:
All platforms
Internal Tracking #:
282157
Resolution:
Fixed
(Resolution Comments)
Resolved in Build:
:
16.0.4180.40356
Duplicate of:
None
Voting and Rating
Overall Rating:
(1 Total Rating)
2.00 out of 5
Total Votes:
11
Description
When changed Windows theme (Classic) at runtime while application is running, the image of TBitBtn is vanished.
Please see Steps.
Steps to Reproduce:
1.Enable Windows themes.
2.Run test.exe. (Attachments)
3.Disable Windows themes at runtime while test.exe is running. (Window Classic)
EXP:
The image is displayed.
ACT:
The image is not displayed.
Workarounds
None
Attachment
source.zip
Comments
Tomohiro Takahashi at 3/9/2011 5:38:52 AM
-
Could you please attach entire sample project to reproduce your issue?
Hideaki Tominaga at 3/9/2011 5:46:44 AM
-
Added it.
Ahto Tanner at 4/9/2011 8:03:47 AM
-
Fix is very simple, buttons.pas must be modified in 2 places. The issue is that painting routine sets TButtonGlyph(FGlyph).FThemesEnabled := true if themed paint is used but if themes are turned off TButtonGlyph(FGlyph).FThemesEnabled remains true. The following fix sets it to false before non-themed paintting is used.
1) procedure TSpeedButton.Paint;
At the end of procedure there is line:
TButtonGlyph(FGlyph).Draw(Canvas, PaintRect, Offset, Caption, FLayout, FMargin,
FSpacing, FState, Transparent, DrawTextBiDiModeFlags(0));
Add one line before it so it reads:
TButtonGlyph(FGlyph).FThemesEnabled := false;
TButtonGlyph(FGlyph).Draw(Canvas, PaintRect, Offset, Caption, FLayout, FMargin,
FSpacing, FState, Transparent, DrawTextBiDiModeFlags(0));
2) procedure TBitBtn.DrawItem(const DrawItemStruct: TDrawItemStruct);
About 13 lines before end of procedure there is line:
TButtonGlyph(FGlyph).Draw(FCanvas, R, Point(0,0), Caption, FLayout, FMargin,
FSpacing, State, False, DrawTextBiDiModeFlags(0) or WordBreakFlag[WordWrap]);
Add one line before it so it reads:
TButtonGlyph(FGlyph).FThemesEnabled := false;
TButtonGlyph(FGlyph).Draw(FCanvas, R, Point(0,0), Caption, FLayout, FMargin,
FSpacing, State, False, DrawTextBiDiModeFlags(0) or WordBreakFlag[WordWrap]);
Tomohiro Takahashi at 4/11/2011 5:36:24 PM
-
Thanks for the information. I will update the internal status of this report.
View Your Reports
Search
Server Response from: ETNACODE01
Developer Tools
Blackfish SQL
C++Builder
Delphi
FireMonkey
Prism
InterBase
JBuilder
J Optimizer
HTML5 Builder
3rdRail & TurboRuby
Database Tools
Change Manager
DBArtisan
DB Optimizer
ER/Studio
Performance Center
Rapid SQL
Technical Articles
Tutorials
White Papers
Press Releases
Newsletters
Add Content (GetPublished)
Audio
Audio & Video
Video
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Tags
Technology Partners
Downloads
Free Trials
Registered User Downloads
Beta Programs
Add Content (GetPublished)
Articles
Blogs
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Member Services
About
Connect with Us