]> git.saurik.com Git - wxWidgets.git/commitdiff
Strange sizing fix in DoResize() to workaround apparent
authorJulian Smart <julian@anthemion.co.uk>
Sat, 6 Apr 2002 20:21:30 +0000 (20:21 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sat, 6 Apr 2002 20:21:30 +0000 (20:21 +0000)
wxChoice returned size inconsistency

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/dirctrlg.cpp

index a9a8a03c6b5370767ffb0c73fc8c18f32f59df18..6d7b7c2158381ccc847b38c71cfb6c75754a8751 100644 (file)
@@ -1184,6 +1184,14 @@ void wxGenericDirCtrl::DoResize()
         wxSize filterSz ;
         if (m_filterListCtrl)
         {
+#ifdef __WXMSW__
+            // For some reason, this is required in order for the
+            // correct control height to always be returned, rather
+            // than the drop-down list height which is sometimes returned.
+            wxSize oldSize = m_filterListCtrl->GetSize();
+            m_filterListCtrl->SetSize(-1, -1, oldSize.x+10, -1, wxSIZE_USE_EXISTING);
+            m_filterListCtrl->SetSize(-1, -1, oldSize.x, -1, wxSIZE_USE_EXISTING);
+#endif
             filterSz = m_filterListCtrl->GetSize();
             sz.y -= (filterSz.y + verticalSpacing);
         }