Add support for wxTE_NO_VSCROLL style to wxTextCtrl (wxOSX)

This commit is contained in:
Artur Wieczorek
2017-08-02 21:26:51 +02:00
parent 794e1b275b
commit 1731ad5e31
3 changed files with 4 additions and 2 deletions

View File

@@ -225,6 +225,7 @@ wxOSX:
- Allow turning on/off opacity selector in wxColourDialog.
- Implement wxTextCtrl::PositionToXY() and XYToPosition().
- Implement wxTextCtrl::ShowPosition().
- Add support for wxTE_NO_VSCROLL style to wxTextCtrl.
Unix:

View File

@@ -976,8 +976,8 @@ public:
@style{wxTE_NO_VSCROLL}
For multiline controls only: vertical scrollbar will never be
created. This limits the amount of text which can be entered into
the control to what can be displayed in it under MSW but not under
GTK2. Currently not implemented for the other platforms.
the control to what can be displayed in it under wxMSW but not under
wxGTK or wxOSX. Currently not implemented for the other platforms.
@style{wxTE_LEFT}
The text in the control will be left-justified (default).
@style{wxTE_CENTRE}

View File

@@ -716,6 +716,7 @@ wxNSTextViewControl::wxNSTextViewControl( wxTextCtrl *wxPeer, WXWidget w, long s
[m_scrollView setHasVerticalScroller:YES];
[m_scrollView setHasHorizontalScroller:hasHScroll];
[m_scrollView setHasVerticalScroller:(style & wxTE_NO_VSCROLL)? NO: YES];
NSSize contentSize = [m_scrollView contentSize];
NSRect viewFrame = NSMakeRect(
0, 0,