unit TransparentShape;
interface
uses
ExtCtrls;
type
TTransparentShape = class(TShape)
private
FTransparent: Boolean;
procedure SetTransparent(const Value: Boolean);
published
property Transparent: Boolean read FTransparent write SetTransparent;
end;
implementation
uses
Graphics;
procedure TTransparentShape.SetTransparent(const Value: Boolean);
begin
if FTransparent <> Value then
begin
FTransparent := Value;
if FTransparent then
Brush.Style := bsClear
else
Brush.Style := bsSolid;
end;
end;
end.