forward enable functionality to inner view in scrollview (eg for multiline textviews)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1920,15 +1920,23 @@ void wxWidgetCocoaImpl::GetBestRect( wxRect *r ) const
|
|||||||
|
|
||||||
bool wxWidgetCocoaImpl::IsEnabled() const
|
bool wxWidgetCocoaImpl::IsEnabled() const
|
||||||
{
|
{
|
||||||
if ( [m_osxView respondsToSelector:@selector(isEnabled) ] )
|
NSView* targetView = m_osxView;
|
||||||
return [m_osxView isEnabled];
|
if ( [m_osxView isKindOfClass:[NSScrollView class] ] )
|
||||||
|
targetView = [(NSScrollView*) m_osxView documentView];
|
||||||
|
|
||||||
|
if ( [targetView respondsToSelector:@selector(isEnabled) ] )
|
||||||
|
return [targetView isEnabled];
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWidgetCocoaImpl::Enable( bool enable )
|
void wxWidgetCocoaImpl::Enable( bool enable )
|
||||||
{
|
{
|
||||||
if ( [m_osxView respondsToSelector:@selector(setEnabled:) ] )
|
NSView* targetView = m_osxView;
|
||||||
[m_osxView setEnabled:enable];
|
if ( [m_osxView isKindOfClass:[NSScrollView class] ] )
|
||||||
|
targetView = [(NSScrollView*) m_osxView documentView];
|
||||||
|
|
||||||
|
if ( [targetView respondsToSelector:@selector(setEnabled:) ] )
|
||||||
|
[targetView setEnabled:enable];
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWidgetCocoaImpl::PulseGauge()
|
void wxWidgetCocoaImpl::PulseGauge()
|
||||||
|
Reference in New Issue
Block a user