mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 21:19:18 +02:00
TStatuBar:
- publish more events and properties - allow have any align/anchors - win32: don't reposition StatusBar to bottom if it have another align (0010386) git-svn-id: trunk@14588 -
This commit is contained in:
parent
3cb1419cb4
commit
df0c6930b5
@ -152,18 +152,26 @@ type
|
|||||||
published
|
published
|
||||||
property Action;
|
property Action;
|
||||||
property Align default alBottom;
|
property Align default alBottom;
|
||||||
|
property Anchors;
|
||||||
property AutoSize default true;
|
property AutoSize default true;
|
||||||
property Panels: TStatusPanels read FPanels write SetPanels;
|
property Panels: TStatusPanels read FPanels write SetPanels;
|
||||||
property SimpleText: String read FSimpleText write SetSimpleText;
|
property SimpleText: String read FSimpleText write SetSimpleText;
|
||||||
property SimplePanel: Boolean read FSimplePanel write SetSimplePanel default True;
|
property SimplePanel: Boolean read FSimplePanel write SetSimplePanel default True;
|
||||||
property Visible default true;
|
property Visible default true;
|
||||||
property Color default clBtnFace;
|
property Color default clBtnFace;
|
||||||
|
property OnClick;
|
||||||
|
property OnContextPopup;
|
||||||
property OnDblClick;
|
property OnDblClick;
|
||||||
property OnDragDrop;
|
property OnDragDrop;
|
||||||
property OnDragOver;
|
property OnDragOver;
|
||||||
|
property OnEndDock;
|
||||||
property OnEndDrag;
|
property OnEndDrag;
|
||||||
property OnHint: TNotifyEvent read FOnHint write FOnHint;
|
property OnHint: TNotifyEvent read FOnHint write FOnHint;
|
||||||
property OnMouseDown;
|
property OnMouseDown;
|
||||||
|
property OnMouseMove;
|
||||||
|
property OnMouseUp;
|
||||||
|
property OnResize;
|
||||||
|
property OnStartDock;
|
||||||
property OnStartDrag;
|
property OnStartDrag;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -27,9 +27,8 @@ begin
|
|||||||
FSimplePanel := True;
|
FSimplePanel := True;
|
||||||
FPanels := CreatePanels;
|
FPanels := CreatePanels;
|
||||||
Color := clBtnFace;
|
Color := clBtnFace;
|
||||||
Anchors:=[akLeft,akRight,akBottom];
|
|
||||||
Align := alBottom;
|
Align := alBottom;
|
||||||
AutoSize:=true;
|
AutoSize := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -123,19 +122,20 @@ begin
|
|||||||
//DebugLn('TStatusBar.UpdateHandleObject C update all panels');
|
//DebugLn('TStatusBar.UpdateHandleObject C update all panels');
|
||||||
TWSStatusBarClass(WidgetSetClass).Update(Self);
|
TWSStatusBarClass(WidgetSetClass).Update(Self);
|
||||||
if SimplePanel then
|
if SimplePanel then
|
||||||
FHandlePanelCount:=1
|
FHandlePanelCount := 1
|
||||||
else
|
else
|
||||||
FHandlePanelCount:=Panels.Count;
|
FHandlePanelCount := Panels.Count;
|
||||||
end;
|
end;
|
||||||
FHandleObjectNeedsUpdate:=false;
|
FHandleObjectNeedsUpdate := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TStatusBar.CalculatePreferredSize(var PreferredWidth,
|
procedure TStatusBar.CalculatePreferredSize(var PreferredWidth,
|
||||||
PreferredHeight: integer; WithThemeSpace: Boolean);
|
PreferredHeight: integer; WithThemeSpace: Boolean);
|
||||||
begin
|
begin
|
||||||
inherited CalculatePreferredSize(PreferredWidth,PreferredHeight,WithThemeSpace);
|
inherited CalculatePreferredSize(PreferredWidth, PreferredHeight, WithThemeSpace);
|
||||||
PreferredWidth:=0;
|
PreferredWidth := 0;
|
||||||
if PreferredHeight<=0 then PreferredHeight:=25;
|
if PreferredHeight <= 0 then
|
||||||
|
PreferredHeight := 25;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TStatusBar.ColorIsStored: boolean;
|
function TStatusBar.ColorIsStored: boolean;
|
||||||
|
@ -2150,6 +2150,9 @@ begin
|
|||||||
ThemeServices.UpdateThemes;
|
ThemeServices.UpdateThemes;
|
||||||
ThemeServices.IntfDoOnThemeChange;
|
ThemeServices.IntfDoOnThemeChange;
|
||||||
end;
|
end;
|
||||||
|
WM_SIZE:
|
||||||
|
if lWinControl is TStatusBar then
|
||||||
|
WinProcess := False;
|
||||||
|
|
||||||
{ >= WM_USER }
|
{ >= WM_USER }
|
||||||
|
|
||||||
|
@ -342,13 +342,10 @@ begin
|
|||||||
begin
|
begin
|
||||||
pClassName := STATUSCLASSNAME;
|
pClassName := STATUSCLASSNAME;
|
||||||
WindowTitle := StrCaption;
|
WindowTitle := StrCaption;
|
||||||
Left := LongInt(CW_USEDEFAULT);
|
|
||||||
Top := LongInt(CW_USEDEFAULT);
|
|
||||||
Width := LongInt(CW_USEDEFAULT);
|
|
||||||
Height := LongInt(CW_USEDEFAULT);
|
|
||||||
end;
|
end;
|
||||||
// create window
|
// create window
|
||||||
FinishCreateWindow(AWinControl, Params, false);
|
FinishCreateWindow(AWinControl, Params, false);
|
||||||
|
Params.WindowInfo^.needParentPaint := false;
|
||||||
// need to set handle for Update method
|
// need to set handle for Update method
|
||||||
AWinControl.Handle := Params.Window;
|
AWinControl.Handle := Params.Window;
|
||||||
Update(TStatusBar(AWinControl));
|
Update(TStatusBar(AWinControl));
|
||||||
|
Loading…
Reference in New Issue
Block a user