Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > wxPython : getting started

Reply
Thread Tools

wxPython : getting started

 
 
David Sulc
Guest
Posts: n/a
 
      11-29-2005
Hi !

I've looked all over (internet, books, etc.) and I haven't found a very
good ressource to get started with wxPython (yes, I've been through
their tutorial).

What I would basically like to do for starters is to be able to define
the main panel being displayed. For example :
1. wxFrame contains a wxPanel (call it mainPanel).
2. mainPanel contains another panel (childPanelA)
3. another panel has been defined (childPanelB) but is not displayed
(the user can only see childPanelA inside mainPanel)
4. by clicking on a menu entry (for example), the displayed panel is now
childPanelA (which is inside mainPanel)

So how do I do this ? I realize it's a very basic question, but it's
been driving me mad...

Also, is there any good open source wxPython program that I could study ?

Thanks for any help...
 
Reply With Quote
 
 
 
 
Colin J. Williams
Guest
Posts: n/a
 
      11-29-2005
David Sulc wrote:
> Hi !
>
> I've looked all over (internet, books, etc.) and I haven't found a very
> good ressource to get started with wxPython (yes, I've been through
> their tutorial).
>
> What I would basically like to do for starters is to be able to define
> the main panel being displayed. For example :
> 1. wxFrame contains a wxPanel (call it mainPanel).
> 2. mainPanel contains another panel (childPanelA)
> 3. another panel has been defined (childPanelB) but is not displayed
> (the user can only see childPanelA inside mainPanel)
> 4. by clicking on a menu entry (for example), the displayed panel is now
> childPanelA (which is inside mainPanel)
>
> So how do I do this ? I realize it's a very basic question, but it's
> been driving me mad...
>
> Also, is there any good open source wxPython program that I could study ?
>
> Thanks for any help...

David,

I'm dodging your question but you might find this soon to be released
book helpful:
http://www.manning.com/books/rappin

Also Boa Constructor is a helpful tool.

Colin W.

 
Reply With Quote
 
 
 
 
Tony Nelson
Guest
Posts: n/a
 
      11-29-2005
In article <438c8dc4$>,
David Sulc <> wrote:

> Hi !
>
> I've looked all over (internet, books, etc.) and I haven't found a very
> good ressource to get started with wxPython (yes, I've been through
> their tutorial).
>
> What I would basically like to do for starters is to be able to define
> the main panel being displayed. For example :
> 1. wxFrame contains a wxPanel (call it mainPanel).
> 2. mainPanel contains another panel (childPanelA)
> 3. another panel has been defined (childPanelB) but is not displayed
> (the user can only see childPanelA inside mainPanel)
> 4. by clicking on a menu entry (for example), the displayed panel is now
> childPanelA (which is inside mainPanel)
>
> So how do I do this ? I realize it's a very basic question, but it's
> been driving me mad...

...

I don't know or use wxWidgets, and I've just learned GTK, but I think
one good answer is the same as with GTK: use a wxNotebook. You may be
able to hide the tabs, or you may just decide they're a good thing to
have.

To do what you asked, see the wxWindow method Show(), which you would
call for each or A and B etc. in response to the command.
__________________________________________________ ______________________
TonyN.:' *firstname*nlsnews@georgea*lastname*.com
' <http://www.georgeanelson.com/>
 
Reply With Quote
 
hrh1818
Guest
Posts: n/a
 
      11-30-2005
One possible source of help is the book "Python Programming on Win 32".
It has a 20 page introducrtion on using wxPython.

Howard


David Sulc wrote:
> Hi !
>
> I've looked all over (internet, books, etc.) and I haven't found a very
> good ressource to get started with wxPython (yes, I've been through
> their tutorial).
>
> What I would basically like to do for starters is to be able to define
> the main panel being displayed. For example :
> 1. wxFrame contains a wxPanel (call it mainPanel).
> 2. mainPanel contains another panel (childPanelA)
> 3. another panel has been defined (childPanelB) but is not displayed
> (the user can only see childPanelA inside mainPanel)
> 4. by clicking on a menu entry (for example), the displayed panel is now
> childPanelA (which is inside mainPanel)
>
> So how do I do this ? I realize it's a very basic question, but it's
> been driving me mad...
>
> Also, is there any good open source wxPython program that I could study ?
>
> Thanks for any help...


 
Reply With Quote
 
Peter Milliken
Guest
Posts: n/a
 
      11-30-2005
The book that Colin points out looks good - but not available until Jan
2006. When it comes out I might buy it - just out of curiosity

Personally I "bounced" when I attempted to learn wxPython - I found it much
easier to learn and use Tkinter combined with Pmw.

I really tried on the wxPython as well - it wasn't just a 1/2hr exercise
I must have spent between 4 - 6 weeks attempting to get my head around it
before giving up. The Pmw/TkInter combination was much easier to get up and
going with. Pmw is incredibly powerful once you get the ghist of its core
i.e. the MegaWidget, MegaArchetype etc.

Having said that, I still have my printer utility (Win32) written using
wxPython - I never could work out how to get that working with Pmw/TkInter.
I just used sockets to transfer the text to be printed between the wxPython
print utility and my TkInter/Pmw based application

Peter

"David Sulc" <> wrote in message
news:438c8dc4$...
> Hi !
>
> I've looked all over (internet, books, etc.) and I haven't found a very
> good ressource to get started with wxPython (yes, I've been through
> their tutorial).
>
> What I would basically like to do for starters is to be able to define
> the main panel being displayed. For example :
> 1. wxFrame contains a wxPanel (call it mainPanel).
> 2. mainPanel contains another panel (childPanelA)
> 3. another panel has been defined (childPanelB) but is not displayed
> (the user can only see childPanelA inside mainPanel)
> 4. by clicking on a menu entry (for example), the displayed panel is now
> childPanelA (which is inside mainPanel)
>
> So how do I do this ? I realize it's a very basic question, but it's
> been driving me mad...
>
> Also, is there any good open source wxPython program that I could study ?
>
> Thanks for any help...



 
Reply With Quote
 
Magnus Lycka
Guest
Posts: n/a
 
      12-05-2005
hrh1818 wrote:
> One possible source of help is the book "Python Programming on Win 32".
> It has a 20 page introducrtion on using wxPython.


I think that's pretty much out of date though, unless there is a
2nd edition that I missed. I can't say that I remember that chapter,
but wxPython changed quite a bit since that book was written. It's
still a good book though!
 
Reply With Quote
 
Magnus Lycka
Guest
Posts: n/a
 
      12-05-2005
Peter Milliken wrote:
> Personally I "bounced" when I attempted to learn wxPython - I found it much
> easier to learn and use Tkinter combined with Pmw.


It's my impression that Pmw isn't really maintained. AFAIK, the last
release (as well as the last CVS commit) is more than two years old.
 
Reply With Quote
 
Peter Milliken
Guest
Posts: n/a
 
      12-05-2005
Magnus,

Not sure what gave you that idea - there is a Pmw mailing list and very,
very occasionally email activity on it - I believe the product is
maintained, it is most likely considered "complete" in and of itself.
Certainly if there is some object that is not present in the collection then
you can easily create one to your specifications/requirements using the
MegaWidget and MegaArchetype base classes.

Even elements that are not in the Pmw collection - such as elements found in
the BLT are catered for with the Pmw - BLT interface and the "A Users Guide
to Pmw.Blt".

Perhaps the authors should create a new "release" every 6 months or so just
so people don't get this (mistaken) impression - I am just not sure what
they should put into each new "release"

Regards,
Peter


"Magnus Lycka" <> wrote in message
news:dn1u6t$usv$...
> Peter Milliken wrote:
> > Personally I "bounced" when I attempted to learn wxPython - I found it

much
> > easier to learn and use Tkinter combined with Pmw.

>
> It's my impression that Pmw isn't really maintained. AFAIK, the last
> release (as well as the last CVS commit) is more than two years old.



 
Reply With Quote
 
Fredrik Lundh
Guest
Posts: n/a
 
      12-05-2005
Peter Milliken wrote:

> Perhaps the authors should create a new "release" every 6 months or so just
> so people don't get this (mistaken) impression - I am just not sure what they
> should put into each new "release"


just bump the version number slightly, and add a "tested with <latest
minor python release>" to the README file.

</F>



 
Reply With Quote
 
Steve Holden
Guest
Posts: n/a
 
      12-06-2005
David Sulc wrote:
> Hi !
>
> I've looked all over (internet, books, etc.) and I haven't found a very
> good ressource to get started with wxPython (yes, I've been through
> their tutorial).
>
> What I would basically like to do for starters is to be able to define
> the main panel being displayed. For example :
> 1. wxFrame contains a wxPanel (call it mainPanel).
> 2. mainPanel contains another panel (childPanelA)
> 3. another panel has been defined (childPanelB) but is not displayed
> (the user can only see childPanelA inside mainPanel)
> 4. by clicking on a menu entry (for example), the displayed panel is now
> childPanelA (which is inside mainPanel)
>
> So how do I do this ? I realize it's a very basic question, but it's
> been driving me mad...
>
> Also, is there any good open source wxPython program that I could study ?
>
> Thanks for any help...


Without wishing to hijack this thread, I have just been encouraged by
the PyCon organisers to publicise one of the tutorials I'll be giving
the day before PyCon proper starts. Yes, it's a programmer's
introduction to wxPython. See:


http://wiki.python.org/moin/PyCon200...edWithWxPython

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
if a variable is started inside a closure, can it ever be redeclared and started over, outside of the original function? Jake Barnes Javascript 2 02-15-2006 03:32 AM
[wxPython-users] Web based applications are possible with wxPython? Ruben Charles Python 6 10-25-2005 09:41 PM
wxPython - wx package (new style wxPython?) Logan Python 5 12-11-2003 04:12 PM
[PY GUI] interest function in python GUI(wxpython,pyqt) program.wxpython,pyqt ulysses Python 4 10-22-2003 03:28 PM
wxPython looses function "wxPython.wx.miscc" Anand Python 1 07-23-2003 01:59 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57