Hallo,
ein Verbesserungsvorschlag:
Delphi-Quellcode:
procedure TDemoForm.Decorate(l: TLabel; entering: Boolean);
const
PENWIDTH = 2;
var
r: TRect;
begin
Canvas.Pen.Width := PENWIDTH;
if entering
then Canvas.Pen.Color := clHighLight
else Canvas.Pen.Color := Color;
r := l.BoundsRect;
InflateRect(r, PENWIDTH, PENWIDTH);
Canvas.Rectangle(r);
Canvas.Pen.Width := 1;
l.Refresh;
end;
Grüße vom marabu