B4J Question [SOLVED] B4XInputTemplate button width

jroriz

Active Member
Licensed User
Longtime User
1581879699813.png

I didn't find a way to increase the width of the button.
Any suggestion?

Code:
Sub btnFreeForm_Click
    Dim input As B4XInputTemplate
    input.Initialize
    input.RegexPattern = ".+" 'require at least one character
    Wait For (dialog.ShowTemplate(input, "OK", "", "CANCELAR")) Complete (Result As Int)
    If Result = xui.DialogResponse_Positive Then
        dialog.Show(input.Text, "OK", "", "")
    End If
End Sub
 
Note that this button belongs to B4XDialog, not the template.

You can modify the buttons with code like this:
Code:
Dim rs As ResumableSub = Dialog.Show("test", "OK", "", "CANCELAR")
Dim btnCancel As B4XView = Dialog.GetButton(xui.DialogResponse_Cancel)
btnCancel.Width = btnCancel.Width + 20dip
btnCancel.Left = btnCancel.Left - 20dip
Dim btnOk As B4XView = Dialog.GetButton(xui.DialogResponse_Positive)
btnOk.Left = btnOk.Left - 20dip
Wait For (rs) Complete (Result As Int)
 
Upvote 0
Back
Top