Add support for right-aligned checkboxes to wxOSX
Honour wxALIGN_RIGHT style. Closes #17380.
This commit is contained in:
parent
2072bfa00e
commit
e14b589e8e
@ -234,3 +234,4 @@ wxOSX/Cocoa:
|
||||
- Don't generate wxEVT_TEXT_ENTER for controls without wxTE_PROCESS_ENTER.
|
||||
- Implement wxToolTip::SetDelay() (David Vanderson).
|
||||
- Correct positioning of popup menus relative to mouse pointer (John Roberts).
|
||||
- Add support for right-aligned checkboxes (John Roberts).
|
||||
|
@ -56,8 +56,7 @@ enum wxCheckBoxState
|
||||
It can only be done from code. Using this flags allows the user to
|
||||
set the checkbox to the third state by clicking.
|
||||
@style{wxALIGN_RIGHT}
|
||||
Makes the text appear on the left of the checkbox. Not implemented
|
||||
in wxOSX.
|
||||
Makes the text appear on the left of the checkbox.
|
||||
@endStyleTable
|
||||
|
||||
@beginEventEmissionTable{wxCommandEvent}
|
||||
|
@ -28,6 +28,8 @@ wxWidgetImplType* wxWidgetImpl::CreateCheckBox( wxWindowMac* wxpeer,
|
||||
wxNSButton* v = [[wxNSButton alloc] initWithFrame:r];
|
||||
|
||||
[v setButtonType:NSSwitchButton];
|
||||
if (style & wxALIGN_RIGHT)
|
||||
[v setImagePosition:NSImageRight];
|
||||
if (style & wxCHK_3STATE)
|
||||
[v setAllowsMixedState:YES];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user