Kirix Support Forums

wxPaneInfo :: Fixed () - not working properly?

Please post all general questions, comments, bug reports, and any other wxAUI feedback here.

wxPaneInfo :: Fixed () - not working properly?

Postby janknepper on Thu Jan 05, 2006 11:41 pm

Tried this:

fm .AddPane ( resize , wxPaneInfo ().Name ( wxT ( "Resize" ) ).Caption ( wxT ( "Resize" ) ).Left ().MaxSize ( 255, 160 ).MinSize ( 255, 160 ).BestSize ( 255, 160 ).FloatingSize ( iSize ( 255, 160 ) ).CloseButton ( false ).Fixed () );

Which seems to make the 'resize' pane 255 wide, but as high as my screen when I float it. (using wxWidgets 2.6.2 (WX_2_6_BRANCH).

Any idea's?
Does anyone else see this behaviour?
If so... anyone fixing this? If not I wll take a crack at it.
ManiaC++
Jan Knepper
janknepper
Registered User
 
Posts: 5
Joined: Thu Jan 05, 2006 6:57 pm
Location: Petersburg, NJ, USA

Postby Ben on Fri Jan 06, 2006 12:35 am

I'll take a look at this soon.
User avatar
Ben
Kirix Support Team
 
Posts: 525
Joined: Mon Dec 19, 2005 6:29 am

Postby Infinity77 on Fri Jan 06, 2006 1:27 am

Hello Ben,

the problem comes from this line in the code:

Code: Select all
if (pane.min_size.IsFullySpecified())
    GetSizer()->SetSizeHints(this);


It behaves the same also on wxPython. In some way, SetSizeHints is changing the height of the frame to that crazy value. I haven't still found a workaround but... are you sure it's necessary to have that line of code?

Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77
Infinity77
Registered User
 
Posts: 12
Joined: Thu Jan 05, 2006 12:57 am
Location: Milan, Italy

Postby Ben on Fri Jan 06, 2006 3:59 am

are you sure it's necessary to have that line of code?


That line tells a floating frame not to go smaller than the minimum size of the contained component. Something must be going wrong in the minsize calculation of the sizer. The problem might be somewhere else in the wxFrameManager class.

I'm going to look at this in detail soon. Thanks for your tip.

Best,
Ben
User avatar
Ben
Kirix Support Team
 
Posts: 525
Joined: Mon Dec 19, 2005 6:29 am

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

bwilliams wrote:That line tells a floating frame not to go smaller than the minimum size of the contained component. Something must be going wrong in the minsize calculation of the sizer. The problem might be somewhere else in the wxFrameManager class.


Unfortunately that's not all it does:

from wx-2.6.2 docs wrote:wxSizer::SetSizeHints
Tell the sizer to set (and Fit) the minimal size of the window to match the sizer's minimal size.


So, when calling Fit() it launches an OnSize event which in turn sets the floating pane size to the minimum size...

I have posted a patch here that remedies this.

Yiannis.
mandrav
Registered User
 
Posts: 6
Joined: Sat Jan 07, 2006 2:31 pm
Location: Athens, Greece

Return to wxAUI Questions, Thoughts & Feedback