[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiple-button Message boxes not behaving according to documentation


The documentation states:
[quote]
The last button is always assumed to be the cancel and the default button.

This is the same button that is triggered when you close the message box with the ESCAPE key.

In other words, the default action should always do nothing.
[/quote]

However, given the following code in a Qt5 graphical application:
[code]
Public Sub Form_Close()

  If Message.Question("Are you sure you wish to quit.", "Yes", "Cancel") = 2 Then Stop Event

End
[/code]

The default button is the first one. It is shown highlighted and is activated when Return/Enter is pressed.
The Esc button activates the Cancel button as expected.

--
Lee

--- Gambas User List Netiquette [https://gambaswiki.org/wiki/doc/netiquette] ----
--- Gambas User List Archive [https://lists.gambas-basic.org/archive/user] ----