Hey people,
I have an application with one main-frame (self.frame) and a taskbaricon.
Additionally there may be X child frames. When the main-frame is being iconized (Minimized),
the child frames should be iconized, too. I also have a wx.EVT_TASKBAR_LEFT_DCLICK, self.OnTaskBarActivate
Bind which should do the same.
The following code works partly; if the main-frame gets iconized via the minimize button, the child frames hide.
If the main-frame gets iconized via a doubleclick on my icon, the child frames will be minimized but still shown
in the taskbar:
# Icon:
def OnTaskBarActivate(self, evt):
if self.frame.IsIconized():
self.frame.Iconize(False)
self.frame.Show(True)
self.frame.RestoreListFrames()
self.frame.Raise()
elif not self.frame.IsIconized():
self.frame.Iconize(True)
self.frame.Show(False)
self.frame.HideListFrames()
def OnTaskBarMinimize(self, evt):
if not self.frame.IsIconized():
self.frame.Iconize(True)
if self.frame.IsShown():
self.frame.Show(False)
# Frame:
def HideListFrames(self):
for name, frame in self.core.listFrames.iteritems():
if frame != None:
frame.Iconize(True)
frame.Show(False)
def RestoreListFrames(self):
for name, frame in self.core.listFrames.iteritems():
if frame != None:
frame.Iconize(False)
frame.Show(True)
def OnMdrmaIconize(self, event):
if self.core.tbicon != None:
self.Show(False)
self.HideListFrames()
event.Skip()
···
--
Hannes Tismer
Software Development
Medical Display Solutions
Rein EDV GmbH Jakob-Krebs-Straße 124
D-47877 Willich
Fon: +49 2156 49490 Fax: +49 2156 494939
Visit us at www.medisol.org