[Tutor] Python WX module program issues.

Alan Gauld alan.gauld at yahoo.co.uk
Fri Mar 24 06:12:38 EDT 2023


On 23/03/2023 09:14, mhysnm1964 at gmail.com wrote:

> I have created a simple Python 3.10 app using WX module.

Strictly speaking wxPython is not part of the standard
library so out of scope for the tutor list. There is a
dedicated wxPython forum that might be more suitable.

However, it's pretty common so we may have some expertise
to answer the questions. Although that is a lot of code
to plow through!


> frame and two horizontal panels. Panel1 has an edit object in it. Panel2 has
> a list box. The issues I cannot resolve:
> 1. I cannot add any new content to the status bar from the class EditPanel. 

Probably best to tackle these one at a time or else the discussions will
get very complicated.

The above is usually down to scoping. I assume the status bar is
contained in the outer main window? How does the child panel get
access to that main window? Is it the parent widget? Or the
parent of the parent? If you have access to the status bars
containing window then you should be able to update it.

The other thing that can confuse matters with status bars is
if another widget is also updating the status bar and overwrites
your panels output before you can see it.


> 2. The RecordListPanel does not show any content and the database is
> populated.

Can you populate it with a non-database list?
Can you print the database list items to the console?

The answers should determine whether the error lies in the
List update functions or in the database access finctions.

> 3.  F6 is meant to switch between the two panels and set the keyboard focus
> to the next panel.

And the problem is?
"isn't working" is a bit too vague to be helpful.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos





More information about the Tutor mailing list