allowing font changes on multi-line textctrls, see #10801

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2009-05-27 09:52:23 +00:00
parent c2dad387fd
commit f95dd972d9
2 changed files with 8 additions and 0 deletions

View File

@ -56,6 +56,7 @@ public:
virtual void GetSelection( long* from, long* to) const ;
virtual void SetSelection( long from , long to );
virtual void WriteText(const wxString& str) ;
virtual void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true );
protected:
NSScrollView* m_scrollView;

View File

@ -429,6 +429,13 @@ void wxNSTextViewControl::WriteText(const wxString& str)
[m_textView insertText:wxCFStringRef( st , m_wxPeer->GetFont().GetEncoding() ).AsNSString()];
}
void wxNSTextViewControl::SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack )
{
if ([m_textView respondsToSelector:@selector(setFont:)])
[m_textView setFont: font.OSXGetNSFont()];
}
// wxNSTextFieldControl
wxNSTextFieldControl::wxNSTextFieldControl( wxTextCtrl *wxPeer, WXWidget w ) : wxWidgetCocoaImpl(wxPeer, w)