Android Question Respond To Msgbox Ok click

Stichler

Active Member
Licensed User
Hello,

I have a msgbox that pops up and I want to respond to when the user pushes ok. How do I do so? Like for example say the user clicks ok in the message box, and I want it to change a button color? I know how to change the color of a button, just not how to do so from a user clicking ok in a message box. Is it possible? If so how?
 

Mahares

Expert
Licensed User
Longtime User
the user clicks ok in the message box, and I want it to change a button color?
You can use MsgboxAsync Or preferably Msgbox2Async. You can read more about them. Here is a small example:
B4X:
Msgbox2Async("Change button color?", "Button Action", "Yes", "Cancel", "No", Null, False)
    Wait For Msgbox_Result (Result As Int)
    If Result = DialogResponse.POSITIVE Then
        button1.color=Colors.Red
    End If
By the way, you should post questions in the 'Questions' forum not here.
 
Upvote 0
Top