Hi,
I'm developing an application in which I need a dialog with an input field for numbers. I'm using the following code:
This is working fine as long as the number doesn't start with zero. As you can see in the picture, when the first digit is 0, the OK button becomes disabled. How could this be possibly fixed?
I'm developing an application in which I need a dialog with an input field for numbers. I'm using the following code:
Input dialog:
Sub InputPINCode(message As String) As ResumableSub
Dim xui As XUI
Dim Dialog As B4XDialog
Dim Input As B4XInputTemplate
Input.Initialize
Input.lblTitle.Text = message
Dialog.Initialize(MainPage.RootPanel)
Input.ConfigureForNumbers(False, False) 'AllowDecimals, AllowNegative
Dialog.Title = "Enter PIN code"
Wait For (Dialog.ShowTemplate(Input, "OK", "", "Cancel")) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
Dim res As String = Input.Text 'no need to check with IsNumber
Log(res)
Return res
Else
Return "xxxx"
End If
End Sub