B4J Question [SOLVED] B4XInputTemplate button width

jroriz

Active Member
Licensed User
Longtime User

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

B4X:
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
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Note that this button belongs to B4XDialog, not the template.

You can modify the buttons with code like this:
B4X:
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
Cookies are required to use this site. You must accept them to continue using the site. Learn more…