Hello
I have a problem to update the content of a wx.Panel already displayed
after changing a variable, used to define the wx.Panel content.
I have the following elements in my code:
DataList: is a list containing some data
CustomPanel: is a derived class of wx.Panel,
it contains one sizer which contains a smaller panel for each
element of the DataList list
After having displayed CustomPanel on the screen, the elements in
DataList change (after a user action like clicking on button)
I would like to refresh the CustomPanel to take into account the
changes of the DataList list
Is there a kind of Refresh/Update function which could update the
CustomPanel so
that evry sizers and panles contained by this CustomPanel are redrawn
according to the current value of DataList ?
or do you have to write your own update/refresh method for Panel and
Windows objects ?
and are you obliged to detroy the CustomPanel object and re-create a
new one?
I would appreciate any hint/reference to do this, and also a code
sample if possible.
Thanks.
Loïc 2 3422
wxWindow has Update and Refresh methods. You can override the one of your
wxPanel, where you can call all its children to update/refresh themselves.
wxPanel's update could be triggered by a timer event, mouse event or
whatever.
I do such things preferably in timers owned by the widgets themselves.
HTH
Franz GEIGER
"Lo?c Mah?" <lo*******@free.fr> schrieb im Newsbeitrag
news:27**************************@posting.google.c om... Hello
I have a problem to update the content of a wx.Panel already displayed after changing a variable, used to define the wx.Panel content.
I have the following elements in my code:
DataList: is a list containing some data
CustomPanel: is a derived class of wx.Panel, it contains one sizer which contains a smaller panel for each element of the DataList list
After having displayed CustomPanel on the screen, the elements in DataList change (after a user action like clicking on button)
I would like to refresh the CustomPanel to take into account the changes of the DataList list Is there a kind of Refresh/Update function which could update the CustomPanel so that evry sizers and panles contained by this CustomPanel are redrawn according to the current value of DataList ? or do you have to write your own update/refresh method for Panel and Windows objects ? and are you obliged to detroy the CustomPanel object and re-create a new one?
I would appreciate any hint/reference to do this, and also a code sample if possible.
Thanks.
Loïc
Thanks for the answer.
I will try the method you talked about.
For the moment, I am creating a new sizer and new panel
and call the SetSizer(...) and SetAutoLayout(...)
but this is not satisfying me.
Loïc
"F. GEIGER" <f.******@vol.at> wrote in message news:<cn**********@newsreader1.utanet.at>... wxWindow has Update and Refresh methods. You can override the one of your wxPanel, where you can call all its children to update/refresh themselves. wxPanel's update could be triggered by a timer event, mouse event or whatever.
I do such things preferably in timers owned by the widgets themselves.
HTH Franz GEIGER This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
by: Piet |
last post by:
Hello,
I am still struggling with a dynamic dialog box.
I have created a dialog box that will show a variable number of
controls depending on a selection made in a ComboBox also present in
the...
|
by: mdk.R |
last post by:
Hello all:
i'am installed wxPython 2.5 and Python2.3.4..i try execute script
with wxPython but it show error:
Traceback (most recent call last):
File "E:\py\test.py", line 7, in ?
import wx...
|
by: py |
last post by:
I have the following code:
class MainFrame(wx.Frame):
def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, wx.ID_ANY, title,
style=wx.DEFAULT_FRAME_STYLE...
|
by: John Salerno |
last post by:
I'm using the sample code of the file 'simple.py' and trying to make a
single window with a panel in it, but I keep getting an error. Here's my
code: (I know I might need something else, like a...
|
by: zxo102 |
last post by:
Hi everyone,
I am using a python socket server to collect data from a socket
client and then control a image location ( wxpython) with the data,
i.e. moving the image around in the wxpython frame....
|
by: Tyler |
last post by:
Hello All:
I am currently working on a project to create an FEM model for school.
I was thinking about using wxPython to gather the 12 input variables
from the user, then, after pressing the...
|
by: Jimmy |
last post by:
Hi, wxPython is cool and easy to use, But I ran into a problem
recently when I try to write a GUI.
The thing is I want to periodically update the content of StatixText
object, so after create...
|
by: Soren |
last post by:
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...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |