Home » Community » Newbie corner » OK and Cancel Layout
OK and Cancel Layout [message #60742] |
Thu, 22 August 2024 01:55  |
sduensin
Messages: 8 Registered: August 2024 Location: Smithton, IL, USA, Earth
|
Promising Member |
|
|
I've just started using U++ and so far am impressed. However, I've run into some confusion with laying out dialogs that contain "OK" and "Cancel" buttons.
The tutorial says to name two buttons - one "ok" and one "cancel" - and then call CtrlLayoutOKCancel. I did this, and it works. But...
Can you not control the order of the buttons? On my form, I have "cancel" and then "ok". When it displays at runtime, the "ok" button is first! I can deal with this, except when using PromptOKCancel, they're the other way around!
How can I have consistent buttons?
|
|
|
|
|
|
|
|
|
|
|
Re: OK and Cancel Layout [message #60759 is a reply to message #60748] |
Mon, 02 September 2024 00:24  |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
sduensin wrote on Mon, 26 August 2024 03:00Must be a Linux/GTK issue...

There is very special and sort of nasty code that swaps OK and Cancel buttons automatically in gtk and macos because that is how those platform have these buttons usually. I mean, you desing as "in windows" and it then gets swapped in gtk.
If you really disagree, you can disable this behaviour with SwapOKCancel_Write(false).
[Updated on: Mon, 02 September 2024 00:25] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat Apr 26 02:20:33 CEST 2025
Total time taken to generate the page: 0.00665 seconds
|