mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 23:59:10 +02:00
lcl: add delphi compatible DrawPanel method to the TStatusBar to allow component descendants override it without hooking to event
git-svn-id: trunk@18319 -
This commit is contained in:
parent
f71d89b2b3
commit
545a71f8fa
@ -155,6 +155,7 @@ type
|
|||||||
|
|
||||||
function DoSetApplicationHint(AHintStr: String): Boolean; virtual;
|
function DoSetApplicationHint(AHintStr: String): Boolean; virtual;
|
||||||
function DoHint: Boolean; virtual;
|
function DoHint: Boolean; virtual;
|
||||||
|
procedure DrawPanel(Panel: TStatusPanel; const Rect: TRect); dynamic;
|
||||||
procedure LMDrawItem(var Message: TLMDrawItems); message LM_DRAWITEM;
|
procedure LMDrawItem(var Message: TLMDrawItems); message LM_DRAWITEM;
|
||||||
public
|
public
|
||||||
constructor Create(TheOwner: TComponent); override;
|
constructor Create(TheOwner: TComponent); override;
|
||||||
|
@ -86,14 +86,19 @@ begin
|
|||||||
OnHint(Self);
|
OnHint(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TStatusBar.LMDrawItem(var Message: TLMDrawItems);
|
procedure TStatusBar.DrawPanel(Panel: TStatusPanel; const Rect: TRect);
|
||||||
begin
|
begin
|
||||||
if Assigned(FOnDrawPanel) then
|
if Assigned(FOnDrawPanel) then
|
||||||
with Message.DrawItemStruct^ do
|
FOnDrawPanel(Self, Panel, Rect);
|
||||||
begin
|
end;
|
||||||
Canvas.Handle := _hDC;
|
|
||||||
FOnDrawPanel(Self, Panels[itemID], rcItem);
|
procedure TStatusBar.LMDrawItem(var Message: TLMDrawItems);
|
||||||
end;
|
begin
|
||||||
|
with Message.DrawItemStruct^ do
|
||||||
|
begin
|
||||||
|
Canvas.Handle := _hDC;
|
||||||
|
DrawPanel(Panels[itemID], rcItem);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TStatusBar.BoundsChanged;
|
procedure TStatusBar.BoundsChanged;
|
||||||
|
Loading…
Reference in New Issue
Block a user