Thal, you could take a look at this discussion [0] Regards Gianluigi
[0] http://gambas.8142.n7.nabble.com/MessageBox-problem-td56154.html#a56231 2017-07-19 15:33 GMT+02:00 Tony Morehen <tmore...@ajmconsulting.ca>: > That is the documented behaviour: > > All Message functions can have up to three buttons: > > * > > The first button is always the default button. > > * > > The last button is always the cancel button. > > > On 2017-07-19 09:20 AM, bugtrac...@gambaswiki.org wrote: > >> http://gambaswiki.org/bugtracker/edit?object=BUG.1128&from=L21haW4- >> >> C THAL reported a new bug. >> >> Summary >> ------- >> >> Message.Question should return -1 on cancel >> >> Type : Bug >> Priority : Medium >> Gambas version : 3.9.90 (TRUNK) >> Product : Language >> >> >> Description >> ----------- >> >> Message.Question returns 2 if the message window was closed or canceled >> via <Esc>. >> >> That is bad, especially if there are two buttons and the action should >> not be default, but on button two, like so: >> >> Dim ret as integer >> >> ret = Message.Question("Do you really want to delete all?", "No", "Yes") >> >> ------------------------------------------------------------ >> -------------- >> >> If the user cancels or closes the window of the message it returns 2! All >> will be deleted ... >> >> >> >> >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user