Kirix Support Forums

Fix for wxAUI-0.9 floating pane size problem

Please post any wxAUI patches or modifications you've created here. Thanks!

Fix for wxAUI-0.9 floating pane size problem

Postby mandrav on Sat Jan 07, 2006 2:34 pm

The floating pane size is ignored (at least with wx-2.6.2). This patch fixes the problem:

Code: Select all
--- manager-base.cpp   Wed Dec 14 18:04:54 2005
+++ manager.cpp   Sat Jan 07 15:05:40 2006
@@ -376,7 +376,13 @@

         if (pane.min_size.IsFullySpecified())
+        {
+            // because SetSizeHints() calls Fit() too (which sets the window size to its minimum allowed),
+            // we keep the size before calling SetSizeHints() and reset it afterwards...
+            wxSize tmp = GetSize();
+            SetSize(tmp);
+        }
Registered User
Posts: 6
Joined: Sat Jan 07, 2006 2:31 pm
Location: Athens, Greece

Postby Guest on Sun Jan 08, 2006 1:27 am

Yep, I've run into this issue also (SetSizeHints() calling Fit()). Looks like a good patch. I'll try it out on Monday when I return home.


Postby Ben on Mon Jan 09, 2006 4:43 pm

Applied. Thanks much. You'll see it in 0.9.1 soon.
User avatar
Kirix Support Team
Posts: 525
Joined: Mon Dec 19, 2005 6:29 am

Postby Infinity77 on Mon Jan 09, 2006 9:32 pm

Hello List,

I am really sorry to break in again in the forum, but I am having problems in making the patch working. Lines 377-382 of wxAUI should look like this now

Code: Select all
    if (pane.min_size.IsFullySpecified())
        wxSize tmp = GetSize();

I have modified a little bit the demo (all panes perspective) to have:

Code: Select all
m_mgr.AddPane(new SettingsPanel(this,this), wxPaneInfo ().
Name ( wxT ( "Resize" ) ).Caption ( wxT ( "Resize" ) ).Left ().
MaxSize ( wxSize(255, 160) ).MinSize ( wxSize(255, 160) ).
BestSize ( wxSize(255, 160) ).
FloatingSize ( wxSize ( 255, 160 ) ).
CloseButton ( false ).Fixed () );

But if I float the SettingsPanel it still has an height of 996 pixels, almost my screen height. Am I missing something? I'm on Windows XP, wxWidgets 2.6.2 (downloaded some weeks ago).

Thanks a lot for your help.

"Imagination Is The Only Weapon In The War Against Reality."
Registered User
Posts: 12
Joined: Thu Jan 05, 2006 12:57 am
Location: Milan, Italy

Postby Peek on Thu Mar 30, 2006 12:55 pm

I'm having the same trouble. I've been able to get a floated pane to size properly by setting the pane's dock_proportion = 1 before adding it to the frame manager, but the contents of the pane are still being drawn as if they were in a larger frame (i.e., some of the pane's contents are not drawn because they're outside the frame). Anyone have any ideas what could be going on here?

Return to wxAUI Patches & Modifications