[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multiple-button Message boxes not behaving according to documentation
[Thread Prev] | [Thread Next]
- Subject: Re: Multiple-button Message boxes not behaving according to documentation
- From: T Lee Davidson <t.lee.davidson@xxxxxxxxx>
- Date: Mon, 15 Jul 2024 18:23:06 -0400
- To: user@xxxxxxxxxxxxxxxxxxxxxx
On 7/15/24 16:37, Gianluigi wrote:
Il 15/07/24 22:27, Gianluigi ha scritto:Il 15/07/24 21:36, T Lee Davidson ha scritto: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.Hi Lee and so: Public Sub Form_Close() Message.DefaultButton = False If Message.Question("Are you sure you wish to quit.", "Yes", "Cancel") = 2 Then Stop Event End Regards GianluigiThe mess was made when the functioning of message was changed compared to before. The default wiki instead says that the default button is always the first... Regards Gianluigi
Thank you for your responses, Gianluigi. So then, it appears that the documentation is incorrect, or at least misleading/incomplete. Agreed? -- Lee --- Gambas User List Netiquette [https://gambaswiki.org/wiki/doc/netiquette] ---- --- Gambas User List Archive [https://lists.gambas-basic.org/archive/user] ----
Re: Multiple-button Message boxes not behaving according to documentation | Bruce Steers <bsteers4@xxxxxxxxx> |
Multiple-button Message boxes not behaving according to documentation | T Lee Davidson <t.lee.davidson@xxxxxxxxx> |
Re: Multiple-button Message boxes not behaving according to documentation | Gianluigi <gradobag@xxxxxxxxxxx> |
Re: Multiple-button Message boxes not behaving according to documentation | Gianluigi <gradobag@xxxxxxxxxxx> |