Toolbar vs Back Button Closing/Close

I have done away with the Back button so that I can give the users a warning that they will loose their data and put a Message box up activated from the Toolbar giving them the option Cancel/Close.

If I used the Back Button I get a nice smooth push to the Main screen but if I put ‘Close’ in the Message box the window closes but but there is no nice push transition. Instead the screen goes white for a second before the Main menu shows.

Is there a way to get my warning to the user and a smooth exit to the main screen?

I’m sure this is a timing issue where the messagebox and the screen are closing at the same time.

Close the screen with a small delay using

Timer.CallLater 300, self.close
1 Like

Edit:

Timer.CallLater 300, AddressOf self.close

Yes just worked that out :slight_smile: Thanks Jeremie.
Can you disable the back button in the open event and add a LeftToolbarbutton? I have been trying but can’t seem to find a way.
Probably should be another thread

Yes. Using iOSDesignExtensions, place this in the Screen.Opening event:

self.SetHidesBackButtonXC(True)
1 Like

Perfect Jeremie that is really useful :slight_smile: