From f65bd6ebfc5c1d4b69700a8e09a28e197419581f Mon Sep 17 00:00:00 2001 From: gambas Date: Mon, 13 May 2019 21:16:08 +0200 Subject: [PATCH] SpinBox: Hitting the ENTER or RETURN key triggers the Change event if needed. [GB.GUI.BASE] * NEW: SpinBox: Hitting the ENTER or RETURN key triggers the Change event if needed. --- comp/src/gb.gui.base/.src/Paint.class | 2 +- comp/src/gb.gui.base/.src/SpinBox.class | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/comp/src/gb.gui.base/.src/Paint.class b/comp/src/gb.gui.base/.src/Paint.class index 0de937be3..eb90ff5b0 100644 --- a/comp/src/gb.gui.base/.src/Paint.class +++ b/comp/src/gb.gui.base/.src/Paint.class @@ -256,7 +256,7 @@ Static Public Sub DrawRect(X As Float, Y As Float, Width As Float, Height As Flo If Size = 0 Then Return If Size < 0 Then - Size = - Size + Size = -Size X -= Size Y -= Size Width += Size * 2 diff --git a/comp/src/gb.gui.base/.src/SpinBox.class b/comp/src/gb.gui.base/.src/SpinBox.class index 02b356d45..328a2c4dc 100644 --- a/comp/src/gb.gui.base/.src/SpinBox.class +++ b/comp/src/gb.gui.base/.src/SpinBox.class @@ -183,6 +183,13 @@ Public Sub TextBox_MouseWheel() End +Public Sub TextBox_Activate() + + CheckValue + +End + + Private Sub SetValue(iValue As Integer, Optional bFocus As Boolean) Dim sValue As String