By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,767 Members | 2,114 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,767 IT Pros & Developers. It's quick & easy.

Wxpython. Is it possible to change layout in a running application?Selfmade listbox

P: n/a
Hi,

Id like to make my own special listbox.. I want to able (at the push
of a button) to add another item to my special listbox... each item is
a panel with a label, some buttons and maybe a text control.

I've tried adding a new panel object with the stuff i want to the
sizer i'm using for my listbox (which is a panel which can contain
other panels)... and then run update() and refresh() on everything...
But it doesn't work.. i see a panel appearing, but it's just a small
square in the corner of my "listbox" panel, and it only works the
first time... nothing new appears when I push the button again.

Is it at all possible to do this? Has anyone created something
similar? Does anyone know what i'm doing wrong?

Thanks,
Soren
Apr 7 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Apr 7, 12:50 pm, Soren <soren.skou.niel...@gmail.comwrote:
Hi,

Id like to make my own special listbox.. I want to able (at the push
of a button) to add another item to my special listbox... each item is
a panel with a label, some buttons and maybe a text control.

I've tried adding a new panel object with the stuff i want to the
sizer i'm using for my listbox (which is a panel which can contain
other panels)... and then run update() and refresh() on everything...
But it doesn't work.. i see a panel appearing, but it's just a small
square in the corner of my "listbox" panel, and it only works the
first time... nothing new appears when I push the button again.

Is it at all possible to do this? Has anyone created something
similar? Does anyone know what i'm doing wrong?

Thanks,
Soren
Without your code can only really guess, but I'd check that the new
panel you are trying to add to the sizer has the listbox as a parent.

Iain
Apr 7 '08 #2

P: n/a
On Apr 7, 6:50 am, Soren <soren.skou.niel...@gmail.comwrote:
Hi,

Id like to make my own special listbox.. I want to able (at the push
of a button) to add another item to my special listbox... each item is
a panel with a label, some buttons and maybe a text control.

I've tried adding a new panel object with the stuff i want to the
sizer i'm using for my listbox (which is a panel which can contain
other panels)... and then run update() and refresh() on everything...
But it doesn't work.. i see a panel appearing, but it's just a small
square in the corner of my "listbox" panel, and it only works the
first time... nothing new appears when I push the button again.

Is it at all possible to do this? Has anyone created something
similar? Does anyone know what i'm doing wrong?

Thanks,
Soren
I'm pretty sure it's possible, but as Iain pointed out, it's hard to
guess what you're doing wrong without some code. Try making a sample
app that demonstrates the issue: http://wiki.wxpython.org/MakingSampleApps

Also, you will probably receive more help at the wxPython specific
list, found here:

http://wxpython.org/maillist.php

HTH

Mike
Apr 7 '08 #3

P: n/a
On Apr 7, 2:54*pm, Mike Driscoll <kyoso...@gmail.comwrote:
On Apr 7, 6:50 am, Soren <soren.skou.niel...@gmail.comwrote:
Hi,
Id like to make my own special listbox.. I want to able (at the push
of a button) to add another item to my special listbox... each item is
a panel with a label, some buttons and maybe a text control.
I've tried adding a new panel object with the stuff i want to the
sizer i'm using for my listbox (which is a panel which can contain
other panels)... and then run update() and refresh() on everything...
But it doesn't work.. i see a panel appearing, but it's just a small
square in the corner of my "listbox" panel, and it only works the
first time... nothing new appears when I push the button again.
Is it at all possible to do this? Has anyone created something
similar? Does anyone know what i'm doing wrong?
To remove any doubt, yes this is possible. I guess you forgot to call
the Layout method of the sizer (only update or refresh won't help).
Also, you will probably receive more help at the wxPython specific
list, found here:

http://wxpython.org/maillist.php
That is indeed the best list for wxpython related issues.

Good luck,
Stani
--
Phatch - Photo Batch Processor - http://photobatch.stani.be
SPE - Python Editor - http://pythonide.stani.be
Apr 7 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.