Here the next problem: I have frame with panel and want swap this panel with other which I have created. I have destroy initial panel than create new from other wx.Panel subclass and show it in the frame. Moreover frame Min and Max size should be setted according each panels size. In each panels subclasses I have add following code:
When I first time swap initial panel with new one, the frame's Min and Max sizes sets correctly, here the Max and Min size are the same. But when I call third panel the Min size was not sets... only Max! I mean I can squeeze frame to whatever size, but can't enlarge over it's Max size.
I dont' know why it's works for first time calling, but won't works again?
Here the next problem: I have frame with panel and want swap this panel with other which I have created. I have destroy initial panel than create new from other wx.Panel subclass and show it in the frame. Moreover frame Min and Max size should be setted according each panels size. In each panels subclasses I have add following code:
BTW, it would be *much* easier to test with your sample apps if they were in a single module. If it takes me more than a minute or two to read and understand a sample then I tend to ignore it. Plus, the act of actually rewriting your code into a small sample app will often help you to discover the solution yourself.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
BTW, it would be *much* easier to test with your sample apps if they were in a single module. If it takes me more than a minute or two to read and understand a sample then I tend to ignore it. Plus, the act of actually rewriting your code into a small sample app will often help you to discover the solution yourself.
BTW, it would be *much* easier to test with your sample apps if they were in a single module. If it takes me more than a minute or two to read and understand a sample then I tend to ignore it. Plus, the act of actually rewriting your code into a small sample app will often help you to discover the solution yourself.
Alas, this dont't works for me
Here is lite version.
I think this might work for you.
Basically (removed the GetSize, setSizeHints stuff) and I am getting the containingsizer from self.panel before destroying it and then add the new panel to the sizer and do a fit - see enclosed.
Werner
P.S. There is still an issue that when starting it the menu item BodyFat Estimater is ticked, but is not showing.
Basically (removed the GetSize, setSizeHints stuff) and I am getting the containingsizer from self.panel before destroying it and then add the new panel to the sizer and do a fit - see enclosed.
Yes, with this patch frame size fit it's panels, but main problem is in SetMinSize() and SetMaxSize() for this frame.
Without this methods, self.GetSize() returns unique value for each selected panel, but if I call SetMinSize(self.GetSize()) something has brokes and application start behave incorrectly
Can anybody explain me why???
P.S. There is still an issue that when starting it the menu item BodyFat Estimater is ticked, but is not showing.
Yes, I know. Other question ho I can raise EVT_MENU event after menu creating? And why wx.ITEM_RADIO sets ticked by default, but don't raise an event?
PS. Superiority of wxPython comes from it's community!
Werner F. Bruhin wrote:
> I think this might work for you.
>
> Basically (removed the GetSize, setSizeHints stuff) and I am getting the
> containingsizer from self.panel before destroying it and then add the
> new panel to the sizer and do a fit - see enclosed.
Yes, with this patch frame size fit it's panels, but main problem is in
SetMinSize() and SetMaxSize() for this frame.
Without this methods, self.GetSize() returns unique value for each
selected panel, but if I call SetMinSize(self.GetSize()) something has
brokes and application start behave incorrectly
Can anybody explain me why???
> P.S. There is still an issue that when starting it the menu item BodyFat
> Estimater is ticked, but is not showing.
Yes, I know. Other question ho I can raise EVT_MENU event after menu
creating? And why wx.ITEM_RADIO sets ticked by default, but don't raise
an event?
PS. Superiority of wxPython comes from it's community!
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org