Android Question b4xdialog order buttons

Discussion in 'Android Questions' started by scsjc, Jan 20, 2019.

  1. scsjc

    scsjc Well-Known Member Licensed User

    Is possible change the order from buttons?
    and aling the buttons :"top-left" "center" "top-right" customdialog screen?
  2. Erel

    Erel Administrator Staff Member Licensed User

    Download XUI Views example and modify btnColors_Click to:
    Sub btnColors_Click
    'example of changing the buttons order and position
       Dim rs As ResumableSub = Dialog.ShowTemplate(ColorTemplate, "OK""""CANCEL")
    Dim ok As B4XView = Dialog.GetButton(XUI.DialogResponse_Positive)
    Dim cancel As B4XView = Dialog.GetButton(XUI.DialogResponse_Cancel)
    02dip, cancel.Top, cancel.Parent.Width / 2 - 4dip, cancel.Height)
    0, ok.Parent.Width / 2 + 2dip, ok.Top, ok.Parent.Width / 2 - 4dip, ok.Height)
    Wait For (rs) Complete (Result As Int)
    If Result = XUI.DialogResponse_Positive Then
           Base.Color = ColorTemplate.SelectedColor
    End If
    End Sub
    scsjc likes this.
  3. scsjc

    scsjc Well-Known Member Licensed User

    I do not have words
    Every day I am more surprised by the great advances in B4X, Many thanks
    Erel likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice