I have a problem with the inputbox based on B4XInputTemplate. I need to change the size, because I need set a little longer prompt text. The size doesn't change. Why?
Sub inputBoxNN(Prompt As String, Title As String) As ResumableSub Dim input As B4XInputTemplate dialog.Title = Title input.Initialize input.lblTitle.Text = Prompt input.ConfigureForNumbers(False, False) Wait For (dialog.ShowTemplate(input, "OK", "", "CANCEL")) Complete (Result As Int) If dialog.Visible Then dialog.Resize(80%x,20%y) If Result = xui.DialogResponse_Positive Then Dim res As Int = input.Text End If Return res End Sub:
Sub inputBoxNN(Prompt As String, Title As String) As ResumableSub
Dim input As B4XInputTemplate
dialog.Title = Title
input.Initialize
input.lblTitle.Text = Prompt
input.ConfigureForNumbers(False, False)
Wait For (dialog.ShowTemplate(input, "OK", "", "CANCEL")) Complete (Result As Int)
If dialog.Visible Then dialog.Resize(80%x,20%y)
If Result = xui.DialogResponse_Positive Then
Dim res As Int = input.Text
End If
Return res
End Sub