From: Liam C. <cy...@gm...> - 2005-03-21 21:55:52
|
Hi Brad, You need to put the raise method in a method of the childWindow. I'm on XP, and calling the childWindow's raise method from the originating method as above never works for me. i.e. def on_empMultiColumnList_itemActivated(self, event): #Do stuff to derive id_emp childWindow = model.childWindow(self, empDetail.bgEmpDetail) childWindow.id_emp = id_emp and in empDetail - class bgEmpDetail(model.Background): def on_initialise(self, event): #This will need explaining self.popuulateFields(self.id_emp) self.Raise() See, what happens is that when a child window is created, the method that created finishes before the child window's on_initialise gets called. At the mo, my thing with childWindow.id_emp = id_emp is the only way of passing other parameters to the on_initialise() method. So, you can pass the parameters in, and then your child windows initialisation can act on them. And, sticking Raise() in the child windows init method fixed your problem for me. I hope it helps. If it's confusing at all, let me know and I'll try and explanify further. Regards, Liam Clarke On Mon, 21 Mar 2005 11:11:40 -0600, bra...@om... <bra...@om...> wrote: > > The Raise method for a child window seems not to work on the Mac, but does > work under Windows. On the Mac, the child window starts to pop in front of > the parent window, but then it withdraws behind. From looking at message > watcher, It's almost as if the second click in my doubleclick is bringing > the parent window forward. > > Is there something else I should be doing other than Raise(), or is this a > bug? > > Here is the method runs when I doubleclick my multicolumnlist: > > def on_empMultiColumnList_itemActivated(self, event): > """When an entry is double clicked""" > indexClicked = event.m_itemIndex > base = self.components > rows = base.empMultiColumnList.GetSelectedItems() > if len(rows) == 0: > return > print rows > id_emp = rows[0][0] > empDetail.id_emp = id_emp > self.detailWindow = > model.childWindow(self,empDetail.bgEmpDetail) > self.detailWindow.populateFields(id_emp) > self.detailWindow.Raise() > > > I'm running PythonCard .81, wxPython 2.5.4.1, Python 2.3, Mac OS 10.3.8. > -- 'There is only one basic human right, and that is to do as you damn well please. And with it comes the only basic human duty, to take the consequences. |