C colboy Member Licensed User Longtime User Nov 30, 2019 #1 I've just converted an application using MsgBox2 to MsgBox2Async, to prevent the user pressing outside the dialog and having it cancel. Another problem a user noted was that if the machine goes to sleep with a dialog on the screen, when it awakes, the dialog disappears, I presume the DialagResponse.Cancel is actioned. Is there any way to prevent this. Ideally whenever a dialog appears, the user would like to ensure it remains, so that if a handheld is put down, and then later they resume work, whatever was on the screen remains, so they can pick up where they left off. Any ideas? Thanks, Colin
I've just converted an application using MsgBox2 to MsgBox2Async, to prevent the user pressing outside the dialog and having it cancel. Another problem a user noted was that if the machine goes to sleep with a dialog on the screen, when it awakes, the dialog disappears, I presume the DialagResponse.Cancel is actioned. Is there any way to prevent this. Ideally whenever a dialog appears, the user would like to ensure it remains, so that if a handheld is put down, and then later they resume work, whatever was on the screen remains, so they can pick up where they left off. Any ideas? Thanks, Colin
Erel B4X founder Staff member Licensed User Longtime User Dec 1, 2019 #2 Standard dialogs must be dismissed when the activity is paused. This is also the case with the non-async dialogs. Switch to B4XDialog from XUI Views and don't add this code: B4X: Expand Collapse Copy Sub Activity_Pause (UserClosed As Boolean) Dialog.Close (XUI.DialogResponse_Cancel) End Sub The dialog will remain open. Upvote 0
Standard dialogs must be dismissed when the activity is paused. This is also the case with the non-async dialogs. Switch to B4XDialog from XUI Views and don't add this code: B4X: Expand Collapse Copy Sub Activity_Pause (UserClosed As Boolean) Dialog.Close (XUI.DialogResponse_Cancel) End Sub The dialog will remain open.
C colboy Member Licensed User Longtime User Dec 1, 2019 #3 Erel said: Standard dialogs must be dismissed when the activity is paused. This is also the case with the non-async dialogs. Switch to B4XDialog from XUI Views and don't add this code: B4X: Expand Collapse Copy Sub Activity_Pause (UserClosed As Boolean) Dialog.Close (XUI.DialogResponse_Cancel) End Sub The dialog will remain open. Click to expand... Excellent, that works great. Most of the dialogs I'm using are simple yes, no questions. Is there an alternative way than using a LongTextTemplate, which allows way too much room for a simple question? Upvote 0
Erel said: Standard dialogs must be dismissed when the activity is paused. This is also the case with the non-async dialogs. Switch to B4XDialog from XUI Views and don't add this code: B4X: Expand Collapse Copy Sub Activity_Pause (UserClosed As Boolean) Dialog.Close (XUI.DialogResponse_Cancel) End Sub The dialog will remain open. Click to expand... Excellent, that works great. Most of the dialogs I'm using are simple yes, no questions. Is there an alternative way than using a LongTextTemplate, which allows way too much room for a simple question?
Erel B4X founder Staff member Licensed User Longtime User Dec 2, 2019 #4 Use the standard Dialog.Show method. Upvote 0