Thread View: borland.public.delphi.vcl.components.using.general
3 messages
3 total messages
Started by Andrew
Tue, 17 Jun 2008 11:04
TurboPower TEsCalculator Themes Problem
Author: Andrew
Date: Tue, 17 Jun 2008 11:04
Date: Tue, 17 Jun 2008 11:04
11 lines
1448 bytes
1448 bytes
I have ported the old TurboPower TEsCalculator to D2007. All works ok except that the calculator's Displaystring flickers continuously when Windows XP or Vista themes is used and the Application Settings 'Enable Runtime Themes' is checked. If the setting is unchecked and/or Classic themes are used, the digits display correctly. Has anyone used this component in D2007 and seen this problem? Alternately, is it possible to disable runtime themes just for this component? Regards...Andrew
Re: TurboPower TEsCalculator Themes Problem
Author: Andrew
Date: Tue, 17 Jun 2008 14:19
Date: Tue, 17 Jun 2008 14:19
34 lines
2040 bytes
2040 bytes
In article <VA.000000b5.008ba89f@nowhere>, Andrew wrote:
> I have ported the old TurboPower TEsCalculator to D2007. All works ok
> except that the calculator's Displaystring flickers continuously when
> Windows XP or Vista themes is used and the Application Settings 'Enable
> Runtime Themes' is checked. If the setting is unchecked and/or Classic
> themes are used, the digits display correctly.
>
> Has anyone used this component in D2007 and seen this problem?
> Alternately, is it possible to disable runtime themes just for this
> component?
>
Further info: the component which flickers with themes active is a TPanel
descendant cPanel:
type
{.Z+}
TEsCalcPanel = class(TPanel)
protected
procedure Click;
override;
public
end;
{.Z-}
created by:
..
{Create edit control}
cPanel := TEsCalcPanel.Create(Self);
cPanel.Parent := Self;
cPanel.ParentFont := True;
cPanel.ParentCtl3D := True;
cPanel.Alignment := taRightJustify; etc
Regards...Andrew
Re: TurboPower TEsCalculator Themes Problem
Author: Andrew
Date: Tue, 17 Jun 2008 16:14
Date: Tue, 17 Jun 2008 16:14
31 lines
2113 bytes
2113 bytes
In article <VA.000000b5.008ba89f@nowhere>, Andrew wrote:
> I have ported the old TurboPower TEsCalculator to D2007. All works ok
> except that the calculator's Displaystring flickers continuously when
> Windows XP or Vista themes is used and the Application Settings 'Enable
> Runtime Themes' is checked. If the setting is unchecked and/or Classic
> themes are used, the digits display correctly.
>
> Has anyone used this component in D2007 and seen this problem?
> Alternately, is it possible to disable runtime themes just for this
> component?
>
Right, the problem is caused by:
procedure TEsCustomCalculator.Paint;
var
B : TEsCalculatorButton;
begin
Canvas.Font := Font;
Canvas.Brush.Color := calcDefColor;
Canvas.FillRect(ClientRect);
if Ctl3D then begin
cPanel.BevelOuter := bvLowered;
cPanel.BorderStyle := bsNone;
end else begin
cPanel.BevelOuter := bvNone; <------ Flickering disappears if this
line is commented out
cPanel.BorderStyle := bsSingle;
end;
{draw buttons} etc
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads