It accepts up to 3 buttons. Positive, Cancel and Negative
for example
B4X:
Dim i As Int
i = Msgbox2("Make a choice here", "This is the title", "Edit", "Cancel", "Delete", null)
Select i
Case DialogResponse.POSITIVE Then 'Edit
Case DialogResponse.CANCEL Then 'Cancel
Case DialogResponse.NEGATIVE Then 'Delete
End Select
the null paramater is in place of a bitmap. I've never used this in my apps because I only write stuff for myself.
let's say you only want 2 buttons :
B4X:
Dim i As Int
i = Msgbox2("Make a choice here", "This is the title", "Yes", "", "No", null)
see the 2ndbutton has "" as it's text? This means don't show it
you then test it like this
B4X:
'Select statement or
If i=DialogResponse.POSITIVE Then 'do Yes code
Else If i=DialogResponse.NEGATIVE Then 'do No code
End If
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.