iOS MessageBox Actions???

I’m trying to utilize a simple iOSMessageBox with a yes or no result. If the user clicks YES something happens. If the user clicks NO something else happens.

In the example Xojo has the following code:

[code]HelloMessage.Title = “Hello”
HelloMessage.Message = “Hello, World!”

Dim buttons() As Text

HelloMessage.Buttons = buttons


But that is where it ends. How do you then assign code to the Yes and No buttons? There is nothing listed in the documentation about that.

I’m confused where and how do you write this? Do you put it on the button code that executes the MessageBox and as it is written does not work.

Label1.Text = "You selected button " + buttonIndex.ToText

I saw this earlier , but as it is written it is not clear what to do with it.

Thank you very much Jean-Paul. That was very helpful. I did not know how to use the ButtonAction Event.

If Xojo added this code to their sample code example, it would have been a lot easier to follow.

[code] Select Case ButtonIndex
Case 0
Case 1

End Select[/code]

Thanks again for your help. I really appreciate it. :slight_smile: