A question about iconize(), please help me.

Hi all,

A few days ago, I have created a picture frame just as “shapewindow” in the wx demo.

I deal as follows,

The whole dialog is a frame, and I draw pictures as buttons and frame background.

When the mouse is clicked in the area of MINIMIZE box, I called a simple funtion :

def OnMin(self):

    self.Iconize(True)

When I clicked the MINIMIZE box picture, the frame is hide, and the small dialog in the taskbar has changed it’s state. Then I clicked the small dialog in the taskbar, the main frame is shown and restored. It’s ok!

But my problem is: If the frame is shown, when I click the small dialog in the taskbar,but the main frame can’t be hided.

What can I do?

The attached files are:

fame.jpg – main frame

taskbar.jpg – small dialog in taskbar

iconize_box – icon box button picture

Thanks

Sylar Feng

frame.jpg

taskbar.jpg

iconize_box.jpg

usr.root wrote:

Hi all,
A few days ago, I have created a picture frame just as "shapewindow" in the wx demo.
I deal as follows,
The whole dialog is a frame, and I draw pictures as buttons and frame background.
When the mouse is clicked in the area of MINIMIZE box, I called a simple funtion :
    def OnMin(self):
        self.Iconize(True)
When I clicked the MINIMIZE box picture, the frame is hide, and the small dialog in the taskbar has changed it's state. Then I clicked the small dialog in the taskbar, the main frame is shown and restored. It's ok!
But my problem is: If the frame is shown, when I click the small dialog in the taskbar,but the main frame can't be hided.
What can I do?

If the frame does not have the wx.MINIMIZE_BOX style then clicking on the taskbar will not inconify/restore the frame.

···

--
Robin Dunn
Software Craftsman