I'm working on a wxFrame which contains several things: some buttons and
a map. To place them in the wxFrame, I use wxBoxSizer because I want the
map size to increase or decrease with the wxFrame size but I don't want
the buttons size and the buttons place to change. Furthermore the place
for the map is a wxWindow because of several functionalities (zooms,
...).
For the moment, all was working well. But now I want a wxWindow empty at
the beginning, and when I click on a button I open a wxFileDialog and I
choose a datafile with data for a specific map. I want to read the data
and draw the map at the right place.
The problem is that I can't manage to modify the contents of the
wxWindow. I can't draw the map. Nothing happens. Just drawing a map is
not a problem, but I can't manage to have an empty wxWindow and after to
fill this place with a map, and perhaps another map later.
Am I using the right way to do this (perhaps I have to use a
wxPanel...)? Do you have some ideas which could help me?
For the moment, all was working well. But now I want a wxWindow empty at
the beginning, and when I click on a button I open a wxFileDialog and I
choose a datafile with data for a specific map. I want to read the data
and draw the map at the right place.
The problem is that I can't manage to modify the contents of the
wxWindow. I can't draw the map. Nothing happens. Just drawing a map is
not a problem, but I can't manage to have an empty wxWindow and after to
fill this place with a map, and perhaps another map later.
Without more details I'll just have to guess:
Is the map a class derived from wxWindow or do you just draw on a plain
wxWindow from somewhere else? (I'll assume that it is a derived class that
draws itself.)
When you say empty wxWindow, is it a plain wxWindow that you want to replace
later with a map window, or is it a map window with no map data initially.
If the former then you should probably just put a map window there with no
data, and make sure it knows how to draw itself properly with no map data.
If you are already doing the above then have you tried calling
mapWindow.Refresh() after loading the map data into it?
ยทยทยท
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython!