Android Question XUI Views Example - B4XFloatTextField

rgarnett1955

Active Member
Licensed User
Longtime User
Hi,

How can I make an XUI Input dialog that has B4XFloatTextField.

The XUI Views Example has an example of the B4XFloatTextField, but it it's parent is the main window not a dialog.

There is also an example of an Input dialog template, but it only has a simple text entry field:

XUI Views Example - Input Dilog Snippet:
Sub btnTime_Click
    InputTemplate.lblTitle.Text = "Enter time (HH:MM)"
'    InputTemplate.RegexPattern = "^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$" '<---optional. Remove if not needed
    Wait For (Dialog.ShowTemplate(InputTemplate, "OK", "", "CANCEL")) Complete (Result As Int)
    If Result = XUI.DialogResponse_Positive Then
        btnTime.xLBL.Text = InputTemplate.Text
    End If
End Sub

The B4XFloatTextField is very useful as it has an undo feature, so if the user makes an input error they can "escape" back to the original text and try again.

I would like an XUI dialog where I can have a few B4XFloatTextField, that I can prefill when the dialog is opened and be able to have code that checks the entry when the tick is clicked.

Is this possible?

If so what is the magic to get it to happen?

Best regards
Rob
 
Top