implement transparency (actually, non-transparency)

git-svn-id: trunk@6481 -
This commit is contained in:
micha 2005-01-04 14:23:37 +00:00
parent 4db025c0fc
commit 4d130c0508
2 changed files with 16 additions and 1 deletions

View File

@ -82,6 +82,7 @@ type
procedure ExecuteCancelAction; override;
procedure UpdateRolesForForm; override;
public
property Color: TColor default clBtnFace;
property Default: Boolean read FDefault write SetDefault default false;
property ModalResult: TModalResult read FModalResult write FModalResult default mrNone;
property Cancel: Boolean read FCancel write SetCancel default false;
@ -306,7 +307,7 @@ type
property Margin: integer read FMargin write SetMargin default -1;
property NumGlyphs: Integer read GetNumGlyphs write SetNumGlyphs default 1;
property Spacing: integer read FSpacing write SetSpacing default 4;
property Transparent: Boolean read FTransparent write SetTransparent default false;
property Transparent: Boolean read FTransparent write SetTransparent default true;
end;
@ -383,6 +384,9 @@ end.
{ =============================================================================
$Log$
Revision 1.85 2005/01/04 14:23:37 micha
implement transparency (actually, non-transparency)
Revision 1.84 2004/12/27 19:40:59 mattias
published BorderSpacing for many controls

View File

@ -48,6 +48,8 @@ begin
FDragging := False;
FSpacing := 4;
FMargin := -1;
FTransparent := true;
Color := clBtnFace;
end;
{------------------------------------------------------------------------------
@ -378,6 +380,12 @@ begin
FLastDrawFlags:=GetDrawFlags;
//DebugLn('TCustomSpeedButton.Paint ',Name,':',ClassName,' Parent.Name=',Parent.Name);
if not Transparent then
begin
Canvas.Brush.Color := Color;
Canvas.FillRect(PaintRect);
end;
// do not draw anything if flat and mouse not in control (simplified)
if FLastDrawFlags <> 0 then
@ -761,6 +769,9 @@ end;
{ =============================================================================
$Log$
Revision 1.62 2005/01/04 14:23:37 micha
implement transparency (actually, non-transparency)
Revision 1.61 2004/12/12 23:40:55 mattias
published TSpeedButton.OnDoubleClick