Reputation: 299
Sadly that Delphi2009 has applied the theme service and it always draw the scrollbar using the Windows System Theme. As a result, i cannot custom the scrollbar color.
Is it possible that i can custom the scrollbar color without changing the OS System Theme?
Addition: The Windows Theme is not my concern, i'm only trying to custom the scrollbar color of a given control, such as TMemo, or TStringGrid, etc.
Thank you.
Upvotes: 1
Views: 1139
Reputation: 27367
Explict disabling the theming for the memo will work...
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TMemo=Class(StdCtrls.TMemo)
Procedure CreateWnd;override;
End;
TForm1 = class(TForm)
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
uses uxTheme;
{$R *.dfm}
{ TMemo }
procedure TMemo.CreateWnd;
begin
inherited;
SetWindowTheme(Handle,'','');
end;
end.
Upvotes: 3