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