]> git.saurik.com Git - wxWidgets.git/commitdiff
scrolling hack (always move our own scrollbars highest in z-order)
authorStefan Csomor <csomor@advancedconcepts.ch>
Sun, 12 Dec 2004 15:22:49 +0000 (15:22 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sun, 12 Dec 2004 15:22:49 +0000 (15:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/mac/carbon/window.h
src/mac/carbon/window.cpp

index 5d4f8ccd5694d4742c04c67925807b92e164a2e9..9b5e20c9cb5c2164574f3b2b596ca94882c5d6e9 100644 (file)
@@ -181,6 +181,7 @@ public:
     // the absolute coortinates of this window's root have changed
     virtual void        MacTopLevelWindowChangedPosition() ;
     
+    virtual void        MacChildAdded() ;
     virtual void        MacVisibilityChanged() ;
     virtual void        MacEnabledStateChanged() ;
     virtual void        MacHiliteChanged() ;
index 8bcc7057079a2effecc2f38ea3b8ec9a4ad9ff35..313f6f0b19be708f98b039b3b85ac31450754d70 100644 (file)
@@ -892,6 +892,19 @@ bool wxWindowMac::Create(wxWindowMac *parent, wxWindowID id,
     return TRUE;
 }
 
+void wxWindowMac::MacChildAdded() 
+{
+    if ( m_vScrollBar )
+    {
+        m_vScrollBar->Raise() ;
+    }
+    if ( m_hScrollBar )
+    {
+        m_hScrollBar->Raise() ;
+    }
+
+}
+
 void wxWindowMac::MacPostControlCreate(const wxPoint& pos, const wxSize& size)
 {
     wxASSERT_MSG( m_peer != NULL && m_peer->Ok() , wxT("No valid mac control") ) ;
@@ -904,6 +917,7 @@ void wxWindowMac::MacPostControlCreate(const wxPoint& pos, const wxSize& size)
     ControlRef container = (ControlRef) GetParent()->GetHandle() ;
     wxASSERT_MSG( container != NULL , wxT("No valid mac container control") ) ;
     ::EmbedControl( m_peer->GetControlRef() , container ) ;
+    GetParent()->MacChildAdded() ;
 
     // adjust font, controlsize etc
     DoSetWindowVariant( m_windowVariant ) ;