Hi,
I have a BoxSizer holding an Image.
def __init__(self, parent, ID):
wxPanel.__init__(self, parent, -1)
box = wxBoxSizer(wxVERTICAL)
gif = wxImage(opj('images/test.gif'),
wxBITMAP_TYPE_GIF).ConvertToBitmap()
self.img = wxStaticBitmap(self, -1, gif, wxPoint(0, 0),
wxSize(gif.GetWidth(),
gif.GetHeight()))
box.Add(self.img, 0, wxALIGN_TOP)
box.Add(wxButton(.....
Now I want to change the Image in the upper position:
def LoadBitmap(self, filename):
gif = wxImage(opj(filename),
wxBITMAP_TYPE_GIF).ConvertToBitmap()
self.img1 = wxStaticBitmap(self, -1, gif, wxPoint(0, 0),
wxSize(gif.GetWidth(),
gif.GetHeight()))
self.GetSizer().Remove(self.img)
self.GetSizer().Add(self.img1, 0, wxALIGN_TOP)
self.GetSizer().Layout()
The old Bitmap disappears from the top and the control under it moves
to the top but rests of the old image rest under it and the new image
is displayed at the bottom, but I want to have it on TOP.
Someone knows a solution? Thanks,
Markus