mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-10 09:57:36 +01:00
preferred size of statusbar is actual size.
git-svn-id: trunk@7290 -
This commit is contained in:
parent
0dc9ed7f3a
commit
3412d8b96c
@ -54,6 +54,8 @@ type
|
||||
class procedure SetText(const AWinControl: TWinControl; const AText: string); override;
|
||||
class procedure SetBounds(const AWinControl: TWinControl; const ALeft, ATop,
|
||||
AWidth, AHeight: integer); override;
|
||||
class procedure GetPreferredSize(const AWinControl: TWinControl;
|
||||
var PreferredWidth, PreferredHeight: integer); override;
|
||||
end;
|
||||
|
||||
{ TWin32WSTabSheet }
|
||||
@ -323,6 +325,18 @@ begin
|
||||
Windows.PostMessage(AWinControl.Handle, WM_SIZE, 0, 0);
|
||||
end;
|
||||
|
||||
procedure TWin32WSStatusBar.GetPreferredSize(const AWinControl: TWinControl;
|
||||
var PreferredWidth, PreferredHeight: integer);
|
||||
var
|
||||
R: TRect;
|
||||
begin
|
||||
// statusbars cannot be resized by the LCL, so actual size is prefered size
|
||||
if Windows.GetWindowRect(AWinControl.Handle, R) then begin
|
||||
PreferredHeight:= R.Bottom - R.Top;
|
||||
PreferredWidth:= R.Right - R.Left;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TWin32WSStatusBar.SetPanelText(const AStatusBar: TStatusBar; PanelIndex: integer);
|
||||
begin
|
||||
if AStatusBar.SimplePanel then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user