In wxPython, What is the Standard Process of Making an Application Slightly More Complex Than a Wizard?

徘徊边缘 提交于 2019-12-20 02:30:29

问题


I am attempting to create my first OS-level GUI using wxPython. I have the book wxPython in Action and have looked at the code demos. I have no experience with event-driven programming (aside from some Javascript), sizers, and all of the typical GUI elements. The book is organized a little strangely and assumes I know far more about OS GUI programming than I actually do. I'm fairly recent to object-oriented programming, as well. I'm aware that I am clearly out of my depth.

My application, on the GUI side, is simple: mostly a set of reminder screens ("Turn on the scanner," "Turn on the printer," etc) and background actions in Python either in the filesystem or from hitting a web service, but it is just complex enough that the Wizard class does not quite seem to cover it. I have to change the names on the "Back" and "Next" buttons, disable them at times, and so forth.

What is the standard process for an application such as mine?

1) Create a single wxFrame, then put all of my wxPanels inside of it, hiding all but one, then performing a sequence of hides and shows as the "Next" button (or the current equivalent) are triggered?

2) Create multiple wxFrames, with one wxPanel in each, then switch between them?

3) Some non-obvious fashion of changing the names of the buttons in wxWizard and disabling them?

4) Something I have not anticipated in the three categories above.


回答1:


I don't have a good understanding of your application, but trying to force wxWizard to suit your needs sounds like a bad idea.

I suggest checking out the Demos available from the wxPython website. Go through each demo and I bet you'll find one that suits your needs.

I've personally never used wxWizard as I find it too cumbersome. Instead, I create a sequence of dialogs that do what I need.



来源:https://stackoverflow.com/questions/2119067/in-wxpython-what-is-the-standard-process-of-making-an-application-slightly-more

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!