Minimize -> Maximize

Hi:

I'm novice with wxPython....

I have a MDIParentFrame and a MDIChildFrame

I Open the MDIParentFrame and from the menu the MDIChildFrame...

When i minimize the MDIParentFrame (have bitmap in background) and
then maximize the MDIParentFrame the MDIChilFrame disappears... the
StaticBitmap will appear both in the MDI Parent's client area as well
as the MDI Child's client area.

I load the bitmap with:

bmp = wx.Image("fondo.png", wx.BITMAP_TYPE_PNG).ConvertToBitmap()
self.background = wx.StaticBitmap(self.GetClientWindow() , -1, bmp,
(-100, 0))

Any help?

Please make a small runnable sample that demonstrates the problem.
http://wiki.wxpython.org/MakingSampleApps

···

On Nov 26, 4:25 am, Alberto R <a...@fpress.com> wrote:

Hi:

I'm novice with wxPython....

I have a MDIParentFrame and a MDIChildFrame

I Open the MDIParentFrame and from the menu the MDIChildFrame...

When i minimize the MDIParentFrame (have bitmap in background) and
then maximize the MDIParentFrame the MDIChilFrame disappears... the
StaticBitmap will appear both in the MDI Parent's client area as well
as the MDI Child's client area.

I load the bitmap with:

bmp = wx.Image("fondo.png", wx.BITMAP_TYPE_PNG).ConvertToBitmap()
self.background = wx.StaticBitmap(self.GetClientWindow() , -1, bmp,
(-100, 0))

Any help?

--
Robin Dunn
Software Craftsman

Hi:

I send a sample...

In the code you must change the file fondo.png and execute the script.

From the menu launch the Ficheros/Company... then minimize the app and
maximize. The MDIChilFrame disappears...

If i erase the lines:

bmp = wx.Image("fondo.png", wx.BITMAP_TYPE_PNG).ConvertToBitmap()
self.background = wx.StaticBitmap(self.GetClientWindow() , -1, bmp,(-100,
0))

Then run fine....

best,

segundo.py (2.8 KB)

···

----- Original Message ----- :

I'm novice with wxPython....

I have a MDIParentFrame and a MDIChildFrame

I Open the MDIParentFrame and from the menu the MDIChildFrame...

When i minimize the MDIParentFrame (have bitmap in background) and
then maximize the MDIParentFrame the MDIChilFrame disappears... the
StaticBitmap will appear both in the MDI Parent's client area as well
as the MDI Child's client area.

I load the bitmap with:

bmp = wx.Image("fondo.png", wx.BITMAP_TYPE_PNG).ConvertToBitmap()
self.background = wx.StaticBitmap(self.GetClientWindow() , -1, bmp,
(-100, 0))

Any help?

Instead of putting a new widget on the client window catch its paint event and draw the bitmap to the window yourself.

···

On 11/27/09 2:28 AM, Alberto wrote:

Hi:

I send a sample...

In the code you must change the file fondo.png and execute the script.

From the menu launch the Ficheros/Company... then minimize the app and

maximize. The MDIChilFrame disappears...

If i erase the lines:

bmp = wx.Image("fondo.png", wx.BITMAP_TYPE_PNG).ConvertToBitmap()
self.background = wx.StaticBitmap(self.GetClientWindow() , -1, bmp,(-100,
0))

Then run fine....

--
Robin Dunn
Software Craftsman