Opened 5 months ago

Last modified 5 months ago

#16268 confirmed defect

wxCANCEL_DEFAULT doesn't work with OSX

Reported by: andreas.pflug Owned by:
Priority: low Milestone:
Component: wxOSX-Cocoa Version: 3.0.0
Keywords: Cc:
Blocked By: Blocking:
Patch: no

Description

I'm using wx.MessageDialog(...., wx.YES_NO|wx.CANCEL|wx.CANCEL_DEFAULT) with wxPython 3.0.

Unter WXMSW and WXGTK, the dialog has the cancel button default as expected, but under WXMAC only wx.YES_DEFAULT or wx.NO_DEFAULT works; wx.CANCEL_DEFAULT is like wx.YES_DEFAULT.

Change History (3)

comment:1 Changed 5 months ago by vadz

  • Priority changed from normal to low
  • Status changed from new to confirmed

source:wxWidgets/trunk/src/osx/cocoa/msgdlg.mm doesn't check for wxCANCEL_DEFAULT at all currently, so it's not surprising it doesn't work.

I'm not sure if OS X UI conventions allows for the cancel button to be default, however. AFAICS, the current code relies on default button being the first one in the alert and the cancel button probably shouldn't be the first one, so I'm not sure how to fix this.

comment:2 Changed 5 months ago by VZ

In 76646:

Document that wxCANCEL_DEFAULT doesn't work in wxOSX/Cocoa.

See #16268.

comment:3 Changed 5 months ago by VZ

In 76648:

Document that wxCANCEL_DEFAULT doesn't work in wxOSX/Cocoa.

See #16268.

Note: See TracTickets for help on using tickets.