Add support for wxTE_CHARWRAP to wxTextCtrl
Apparently various text wrapping modes are not supported natively by NSTextView (apart from word wrapping which is used by default) and non-default wrapping has to be implemented in the custom code. To wrap lines at any character, NSLineBreakByCharWrapping style should be applied at any text change to the entire text stored in NSTextStorage associated with NSTextView. This is done in DoUpdateTextStyle() method which is called from controlTextDidChange() when text is modified by the user, or SetStringValue() and WriteText() when text is set programmatically.
This commit is contained in:
@@ -990,7 +990,7 @@ public:
|
||||
scrollbar instead.
|
||||
@style{wxTE_CHARWRAP}
|
||||
For multiline controls only: wrap the lines too long to be shown
|
||||
entirely at any position (wxUniv and wxGTK).
|
||||
entirely at any position (wxUniv, wxGTK, wxOSX).
|
||||
@style{wxTE_WORDWRAP}
|
||||
For multiline controls only: wrap the lines too long to be shown
|
||||
entirely at word boundaries (wxUniv, wxMSW, wxGTK, wxOSX).
|
||||
|
Reference in New Issue
Block a user