mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-11 15:48:34 +02:00
LCL, TToolBar: Added property Orientation
This commit is contained in:
parent
f0826a35cb
commit
2ef4fc98ab
@ -2248,11 +2248,17 @@ type
|
||||
|
||||
TToolBarOnPaintButton = procedure(Sender: TToolButton; State: integer) of object;
|
||||
|
||||
TToolBarOrientation = (
|
||||
tboAutomatic,
|
||||
tboHorizontal,
|
||||
tboVertical
|
||||
);
|
||||
|
||||
TToolBarFlag = (
|
||||
tbfUpdateVisibleBarNeeded,
|
||||
tbfPlacingControls
|
||||
);
|
||||
|
||||
|
||||
TToolBarFlags = set of TToolBarFlag;
|
||||
|
||||
TToolBar = class(TToolWindow)
|
||||
@ -2260,6 +2266,7 @@ type
|
||||
FOnPaint: TNotifyEvent;
|
||||
FOnPaintButton: TToolBarOnPaintButton;
|
||||
FButtonHeight: Integer;
|
||||
FOrientation: TToolBarOrientation;
|
||||
FRealizedButtonHeight,
|
||||
FRealizedButtonWidth,
|
||||
FRealizedDropDownWidth,
|
||||
@ -2308,6 +2315,7 @@ type
|
||||
procedure SetImagesWidth(const aImagesWidth: Integer);
|
||||
procedure SetIndent(const AValue: Integer);
|
||||
procedure SetList(const AValue: Boolean);
|
||||
procedure SetOrientation(AValue: TToolBarOrientation);
|
||||
procedure SetShowCaptions(const AValue: Boolean);
|
||||
procedure SetTransparent(const AValue: Boolean);
|
||||
procedure SetWrapable(const AValue: Boolean);
|
||||
@ -2425,6 +2433,7 @@ type
|
||||
property OnResize;
|
||||
property OnChangeBounds;
|
||||
property OnStartDrag;
|
||||
property Orientation: TToolBarOrientation read FOrientation write SetOrientation default tboAutomatic;
|
||||
end;
|
||||
|
||||
{ TCoolBar }
|
||||
|
@ -244,6 +244,11 @@ end;
|
||||
|
||||
function TToolBar.IsVertical: Boolean;
|
||||
begin
|
||||
case FOrientation of
|
||||
tboHorizontal: exit(False);
|
||||
tboVertical: exit(True);
|
||||
end;
|
||||
|
||||
if (Parent is TCoolBar) then
|
||||
Exit(TCoolBar(Parent).Vertical);
|
||||
|
||||
@ -299,6 +304,13 @@ begin
|
||||
UpdateVisibleBar;
|
||||
end;
|
||||
|
||||
procedure TToolBar.SetOrientation(AValue: TToolBarOrientation);
|
||||
begin
|
||||
if FOrientation = AValue then Exit;
|
||||
FOrientation := AValue;
|
||||
invalidate;
|
||||
end;
|
||||
|
||||
procedure TToolBar.SetFlat(const AValue: Boolean);
|
||||
begin
|
||||
if FFlat = AValue then exit;
|
||||
|
Loading…
Reference in New Issue
Block a user