summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/fpg_spinedit.pas12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gui/fpg_spinedit.pas b/src/gui/fpg_spinedit.pas
index 280529d4..b344b6c5 100644
--- a/src/gui/fpg_spinedit.pas
+++ b/src/gui/fpg_spinedit.pas
@@ -238,7 +238,8 @@ function CreateSpinEditFloat(AOwner: TComponent; x, y, w, h: TfpgCoord;
AFixedDecimals: integer = 1; AValue: extended = 0; ADecimals: integer = -1): TfpgSpinEditFloat;
function CreateSpinEdit(AOwner: TComponent; x, y, w, h: TfpgCoord; AMinValue: integer = 0;
AMaxValue: integer = 100; AIncrement: integer = 1; ALargeIncrement: integer = 10;
- AValue: integer = 0): TfpgSpinEdit;
+ AValue: integer = 0): TfpgSpinEdit; overload;
+function CreateSpinEdit(AOwner: TComponent; x, y, w: TfpgCoord; AOnChangeEvent: TNotifyEvent = nil): TfpgSpinEdit; overload;
implementation
@@ -299,6 +300,15 @@ begin
Result.Value := AValue;
end;
+function CreateSpinEdit(AOwner: TComponent; x, y, w: TfpgCoord; AOnChangeEvent: TNotifyEvent): TfpgSpinEdit;
+begin
+ Result := TfpgSpinEdit.Create(AOwner);
+ Result.SetPosition(x, y, w, Result.Height);
+ if Assigned(AOnChangeEvent) then
+ Result.OnChange := AOnChangeEvent;
+ Result.UpdatePosition;
+end;
+
{ TfpgAbstractSpinEdit }