1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

iOS Question Dialog box

Discussion in 'iOS Questions' started by ginsh, Jul 2, 2019.

  1. ginsh

    ginsh Member Licensed User

    Hi,

    Any one please let me know how to keep the dialog box displayed till the user enters the correct password. The dialog box only has "OK" button. The attached code I tried was the CustomDialog Example.


    Code:
    Do While txtFirstName.Text <> Pass
            
            
    Dim sf As Object = DetailsDialog.ShowAsync("Please enter the password""OK"""""False)
            DetailsDialog.GetButton(DetailsDialog.RESULT_POSITIVE).Enabled = 
    False
            
    Wait For (sf) Dialog_Result (Result As Int)
            
    'disable the OK button.

            
    If Result = DetailsDialog.RESULT_POSITIVE Then
            
                
    If txtFirstName.Text <> Pass Then
                    hd.ToastMessageShow(
    "Wrong Password",True)
                    

                
    End If
            
            
    'Else If Result = DetailsDialog.RESULT_NEGATIVE Then
            
        
            
            
    End If
        
        
    Loop
     

    Attached Files:

  2. Brandsum

    Brandsum Active Member Licensed User

    1. Set auto cancelable false
    2. Don't use dialog inbuilt buttons, create your own as you are using custom dialog
    3. After work is done close the dialog by code and you will get the result in wait for function
    Check this
     

    Attached Files:

    BillMeyer likes this.
Loading...
  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