Pheonix - Having issues resizing panel based on user action

26 views
Skip to first unread message

Ryan Holmes

unread,
Mar 1, 2015, 5:33:48 PM3/1/15
to wxpytho...@googlegroups.com
Hello,

I am trying to port over a bit of code from wx2.8 to wxPheonix (3.0.3.dev78356 msw). I'm using code from the pyfa project (https://github.com/DarkFenX/Pyfa) which is currently being rewritten for python3. This code takes some concepts from PyCollapsiblePane and implements it better (there are some bugs with PCP). If you download and open pyfa, the collapsible panels are on the right side (resources, resistances, etc) if you want to get a feel for how it is supposed to work.

Anyway, I'm trying to port this over and I cannot seem to get it to work well. I know Pheonix introduces some changes to sizers and how things are resized. I am able to collapse the panel (and have the parent panel fit to the new size), and then open it again. But when I try to collapse it again nothing seems to happen. 

This is the module that I'm working on (the script has a test case if run directly): http://pastebin.com/ghuVGXWN

Any ideas?
- Ryan

Ryan Holmes

unread,
Mar 1, 2015, 5:36:51 PM3/1/15
to wxpytho...@googlegroups.com
Here's what is currently happening:


And here is how it's suppposed to work (wxPython 2.8 in the pyfa app)

Werner

unread,
Mar 2, 2015, 4:19:20 AM3/2/15
to wxpytho...@googlegroups.com
Hi Ryan,

BTW, the sizer changes happened already in 2.9.5.

Just as a quick hack I tried:
#toggle_panel = TogglePanel(self)
toggle_panel = pycp.PyCollapsiblePane(self)
toggle_panel.SetLabel("Test Header")

#content_panel = toggle_panel.GetContentPanel()
content_panel = toggle_panel.GetPane()

To me it looks like PyCollabsiblePane as of 2.9.5 behaves correctly.

1. What about consider switching back to PyCollabsiblePane and submit a
PR for the optimizations done in pyfa.
2. Check out the differences between 2.8.12 and 2.9.5 or Phoenix of
PyCollapsiblePane and reimplement them in pyfa

Werner

Ryan Holmes

unread,
Mar 2, 2015, 10:06:58 AM3/2/15
to wxpytho...@googlegroups.com
Hrm, I could have sworn I tried PCP and it didn't work correctly. Maybe I fumbled and tried it in 2.8. Seems to work well in Pheonix

I will look into how it resizes everything and implement it into our own version, will post back with the results. I'll also consider contributing the to module - how does one go about doing this? I primarily use github, but wxPython uses svn. I guess I could contact the original author...

Thanks for pointing me in the right direction. =)
Ryan



--
You received this message because you are subscribed to a topic in the Google Groups "wxPython-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/RDbJuKVdliU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Werner

unread,
Mar 2, 2015, 10:18:11 AM3/2/15
to wxpytho...@googlegroups.com
Hi Ryan,

On 3/2/2015 16:06, Ryan Holmes wrote:
...
> I will look into how it resizes everything and implement it into our
> own version, will post back with the results. I'll also consider
> contributing the to module - how does one go about doing this? I
> primarily use github, but wxPython uses svn. I guess I could contact
> the original author...
wxWidgets and wxPython recently switched to github -
http://wiki.wxpython.org/ContributeWithGIT

Werner

Ryan Holmes

unread,
Mar 2, 2015, 7:49:34 PM3/2/15
to wxpytho...@googlegroups.com
This is wonderful, thanks so much =)



Werner

Reply all
Reply to author
Forward
0 new messages