mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 07:39:22 +02:00
lcl: updown: add flat property.
git-svn-id: trunk@51966 -
This commit is contained in:
parent
4111ab4964
commit
bc17ed1345
@ -1851,6 +1851,7 @@ type
|
|||||||
FWrap: Boolean;
|
FWrap: Boolean;
|
||||||
function GetPosition: SmallInt;
|
function GetPosition: SmallInt;
|
||||||
procedure BTimerExec(Sender : TObject);
|
procedure BTimerExec(Sender : TObject);
|
||||||
|
function GetFlat: Boolean;
|
||||||
procedure SetAlignButton(Value: TUDAlignButton);
|
procedure SetAlignButton(Value: TUDAlignButton);
|
||||||
procedure SetArrowKeys(Value: Boolean);
|
procedure SetArrowKeys(Value: Boolean);
|
||||||
procedure SetAssociate(Value: TWinControl);
|
procedure SetAssociate(Value: TWinControl);
|
||||||
@ -1861,6 +1862,7 @@ type
|
|||||||
procedure SetOrientation(Value: TUDOrientation);
|
procedure SetOrientation(Value: TUDOrientation);
|
||||||
procedure SetPosition(Value: SmallInt);
|
procedure SetPosition(Value: SmallInt);
|
||||||
procedure SetThousands(Value: Boolean);
|
procedure SetThousands(Value: Boolean);
|
||||||
|
procedure SetFlat(Value: Boolean);
|
||||||
procedure SetWrap(Value: Boolean);
|
procedure SetWrap(Value: Boolean);
|
||||||
procedure UpdateAlignButtonPos;
|
procedure UpdateAlignButtonPos;
|
||||||
procedure UpdateOrientation;
|
procedure UpdateOrientation;
|
||||||
@ -1893,6 +1895,7 @@ type
|
|||||||
property Orientation: TUDOrientation read FOrientation write SetOrientation default udVertical;
|
property Orientation: TUDOrientation read FOrientation write SetOrientation default udVertical;
|
||||||
property Position: SmallInt read GetPosition write SetPosition;
|
property Position: SmallInt read GetPosition write SetPosition;
|
||||||
property Thousands: Boolean read FThousands write SetThousands default True;
|
property Thousands: Boolean read FThousands write SetThousands default True;
|
||||||
|
property Flat: Boolean read GetFlat write SetFlat default False;
|
||||||
property Wrap: Boolean read FWrap write SetWrap;
|
property Wrap: Boolean read FWrap write SetWrap;
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
@ -1938,6 +1941,7 @@ type
|
|||||||
property TabOrder;
|
property TabOrder;
|
||||||
property TabStop;
|
property TabStop;
|
||||||
property Thousands;
|
property Thousands;
|
||||||
|
property Flat;
|
||||||
property Visible;
|
property Visible;
|
||||||
property Wrap;
|
property Wrap;
|
||||||
end;
|
end;
|
||||||
|
@ -483,6 +483,14 @@ begin
|
|||||||
Result := FPosition;
|
Result := FPosition;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TCustomUpDown.GetFlat: Boolean;
|
||||||
|
begin
|
||||||
|
if FMinBtn<>nil then
|
||||||
|
Result := (FMinBtn as TSpeedButton).Flat
|
||||||
|
else
|
||||||
|
Result := False;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCustomUpDown.SetMin(Value: SmallInt);
|
procedure TCustomUpDown.SetMin(Value: SmallInt);
|
||||||
begin
|
begin
|
||||||
if Value <> FMin then
|
if Value <> FMin then
|
||||||
@ -549,6 +557,14 @@ begin
|
|||||||
FThousands := Value;
|
FThousands := Value;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomUpDown.SetFlat(Value: Boolean);
|
||||||
|
begin
|
||||||
|
if Flat = Value then Exit;
|
||||||
|
|
||||||
|
(FMinBtn as TSpeedButton).Flat := Value;
|
||||||
|
(FMaxBtn as TSpeedButton).Flat := Value;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCustomUpDown.SetWrap(Value: Boolean);
|
procedure TCustomUpDown.SetWrap(Value: Boolean);
|
||||||
begin
|
begin
|
||||||
if Value <> FWrap then
|
if Value <> FWrap then
|
||||||
|
Loading…
Reference in New Issue
Block a user