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.
Kirix Support Forums
wxPaneInfo :: Fixed () - not working properly?
5 posts
• Page 1 of 1
wxPaneInfo :: Fixed () - not working properly?
ManiaC++
Jan Knepper
Jan Knepper
- janknepper
- Registered User
- Posts: 5
- Joined: Thu Jan 05, 2006 6:57 pm
- Location: Petersburg, NJ, USA
-
Ben - Kirix Support Team
- Posts: 525
- Joined: Mon Dec 19, 2005 6:29 am
Hello Ben,
the problem comes from this line in the code:
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.
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
http://xoomer.virgilio.it/infinity77
- Infinity77
- Registered User
- Posts: 12
- Joined: Thu Jan 05, 2006 12:57 am
- Location: Milan, Italy
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
-
Ben - Kirix Support Team
- Posts: 525
- Joined: Mon Dec 19, 2005 6:29 am
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
5 posts
· Page 1 of 1
Return to wxAUI Questions, Thoughts & Feedback