iOS Question Change colours of CustomLayoutDialog

Falcon

Member
Licensed User
Hi Guys,

Can someone please give me the code to change the blue in the below screenshot to red?
The circle around the 'i' and the 'OK' button backcolor.

Capture.GIF


Thank you very much

Regards,
Jacques.
 

Falcon

Member
Licensed User
Hi Erel / Any experts

I have implemented the B4XDialog as you suggested, I just have one small problem if you could please help me?
How do I get the dialog to block until I press 'OK'? In other words all code execution must stop unti l press 'OK'.
On my custom form (frmCustomMessageBox) I have just one button called 'btnOK'.

This is my code:
B4X:
Sub Button1_Click

        'This needs to wait until I press 'OK'.
        ShowMessageBox("Test","","","OK","")
       
        '.....now do something as the OK button has been pressed......

End Sub


Sub ShowMessageBox(Message As String,Title As String,CancelButtonText As String,PositiveButtonText As String,NegativeButtonText As String)
                       
        DialogPanel = XUI.CreatePanel("")
                             
        Dim ScreenWidth As Float = PageRoot.RootPanel.Width       
        DialogPanel.SetLayoutAnimated(0, 0, 0,ScreenWidth/2, 180dip)
        DialogPanel.LoadLayout("frmCustomMessageBox")
        
        Dim lblMessage As Label = DialogPanel.GetView(0)              'Get the Message Label.
        lblMessage.Text = Message
            
        Dialog2.Title = Title
        
        Dim rs As ResumableSub = Dialog2.ShowCustom(DialogPanel,PositiveButtonText,NegativeButtonText,CancelButtonText)                  
        Wait For (rs) Complete (Result As Int)
     
    End Sub

Many thanks,
Regards Jacques.
 
Upvote 0

Falcon

Member
Licensed User
Hi Erel,

Thanks for your reply.
As you will see in my code I have already implemented resumable sub like this:

B4X:
 Dim rs As ResumableSub = Dialog2.ShowCustom(DialogPanel,PositiveButtonText,NegativeButtonText,CancelButtonText)                  
 Wait For (rs) Complete (Result As Int)

But it still does not wait, what am I doing wrong? ☹
 
Upvote 0
Top