RxFPC:RxSpinEdit - check input value on exit editor
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9336 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
b55eb43cb9
commit
e545177bc3
@ -47,7 +47,7 @@
|
|||||||
{.$DEFINE USE_TRxAppIcon}
|
{.$DEFINE USE_TRxAppIcon}
|
||||||
|
|
||||||
{.$DEFINE USE_DEPRECATES}
|
{.$DEFINE USE_DEPRECATES}
|
||||||
{.$DEFINE OLD_SPIN_EDIT}
|
{.$DEFINE OLD_SPIN_EDIT} //Use old style RxSpinEdit
|
||||||
|
|
||||||
{$if FPC_FULLVERSION<20701}
|
{$if FPC_FULLVERSION<20701}
|
||||||
{$DEFINE NoAutomatedBookmark}
|
{$DEFINE NoAutomatedBookmark}
|
||||||
|
@ -285,6 +285,7 @@ type
|
|||||||
protected
|
protected
|
||||||
function GetEditorClassType: TGEEditClass; override;
|
function GetEditorClassType: TGEEditClass; override;
|
||||||
function GetBuddyClassType: TControlClass; override;
|
function GetBuddyClassType: TControlClass; override;
|
||||||
|
procedure EditExit; override;
|
||||||
|
|
||||||
procedure UpClick(Sender: TObject); virtual;
|
procedure UpClick(Sender: TObject); virtual;
|
||||||
procedure DownClick(Sender: TObject); virtual;
|
procedure DownClick(Sender: TObject); virtual;
|
||||||
@ -1294,6 +1295,12 @@ begin
|
|||||||
Result:=TRxSpinButton;
|
Result:=TRxSpinButton;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomRxSpinEdit.EditExit;
|
||||||
|
begin
|
||||||
|
if CheckValue(Value) <> Value then SetValue(Value);
|
||||||
|
inherited EditExit;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCustomRxSpinEdit.UpClick(Sender: TObject);
|
procedure TCustomRxSpinEdit.UpClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
OldText: string;
|
OldText: string;
|
||||||
|
Loading…
Reference in New Issue
Block a user