scrollbars added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -784,10 +784,31 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
{
|
{
|
||||||
#if wxMAC_USE_MLTE_HIVIEW
|
#if wxMAC_USE_MLTE_HIVIEW
|
||||||
HIRect hr = { bounds.left , bounds.top , bounds.right - bounds.left , bounds.bottom- bounds.top } ;
|
HIRect hr = { bounds.left , bounds.top , bounds.right - bounds.left , bounds.bottom- bounds.top } ;
|
||||||
HITextViewCreate( &hr , 0, FrameOptionsFromWXStyle( m_windowStyle ) , (ControlRef*) &m_macControl ) ;
|
HIViewRef scrollView = NULL ;
|
||||||
m_macTXN = HITextViewGetTXNObject((ControlRef) m_macControl) ;
|
TXNFrameOptions frameOptions = FrameOptionsFromWXStyle( style ) ;
|
||||||
AdjustAttributesFromWXStyle( (TXNObject) m_macTXN , m_windowStyle , true ) ;
|
|
||||||
HIViewSetVisible( (ControlRef) m_macControl , true ) ;
|
if ( frameOptions & (kTXNWantVScrollBarMask|kTXNWantHScrollBarMask) )
|
||||||
|
{
|
||||||
|
HIScrollViewCreate(( frameOptions & kTXNWantHScrollBarMask ? kHIScrollViewOptionsHorizScroll : 0) |
|
||||||
|
( frameOptions & kTXNWantVScrollBarMask ? kHIScrollViewOptionsVertScroll: 0 ) , &scrollView ) ;
|
||||||
|
|
||||||
|
HIViewSetFrame( scrollView, &hr );
|
||||||
|
HIViewSetVisible( scrollView, true );
|
||||||
|
}
|
||||||
|
HIViewRef textView ;
|
||||||
|
HITextViewCreate( NULL , 0, frameOptions , (ControlRef*) &textView ) ;
|
||||||
|
m_macTXN = HITextViewGetTXNObject( textView) ;
|
||||||
|
AdjustAttributesFromWXStyle( (TXNObject) m_macTXN , style , true ) ;
|
||||||
|
HIViewSetVisible( (ControlRef) textView , true ) ;
|
||||||
|
if ( scrollView )
|
||||||
|
{
|
||||||
|
HIViewAddSubview( scrollView , textView ) ;
|
||||||
|
m_macControl = scrollView ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_macControl = textView ;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
short featurSet;
|
short featurSet;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user