473,508 Members | 2,274 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
3 2291
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
2883
by: Grant Edwards | last post by:
Can anybody recommend a good book on wxPython? Are there any books on wxPython? I've been trying to learn wxPython and/or wax for a few weeks, and I'm just not getting it. wxWindows seems...
1
2054
by: flupke | last post by:
Hi, i'm trying to convert my java console app to a python gui. Now, the only problem i seem to have at the moment are the resizers for the layout. It seems that for the purpose of what i'm...
22
5733
by: dcrespo | last post by:
Hi all... I think wxPython is much better than PyGTK. First of all, PyGTK needs the GTK runtime installed, whereas wxPython is entirely Python's modules, so It facilitates the apps'...
1
3475
by: Adam Endicott | last post by:
I'm having some trouble using an HtmlListBox with a GridBagSizer. I'm not sure how best to explain what's happening, but it seems that every time my frame gets resized, the HtmlListBox grows...
3
3485
by: Young H. Rhiu | last post by:
See: http://hilug.org/img/app_layout.GIF I'm implementing an album-like application with wxpython but I'm new to wxPython though I know how to program with python. The problem is that it's not...
6
6201
by: shuf | last post by:
Hello, I am running python 2.4.4 with wxpython 2.6 on Fedora 6. I am trying to set the font color of individual elements in a listbox, but I am not able to with SetItemForegroundColour()...
2
1744
by: BjornB | last post by:
Hi! I'm totally new to Python and I'm jus nw trying to create my first application with wxPython, exciting! However, I have a problem: I'm creating a Frame with a menu and buttonpanel...
44
4951
by: bg_ie | last post by:
Hi, I'm in the process of writing some code and noticed a strange problem while doing so. I'm working with PythonWin 210 built for Python 2.5. I noticed the problem for the last py file...
8
3702
by: Janwillem | last post by:
Is there a way to force the wx.FileDialog to show as default the thumbnails vie in stead of list view? thanks, janwillem
0
7398
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3208
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3194
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1566
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
428
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.