From: <kim...@ya...> - 2005-06-07 22:07:23
|
Hello list, I am writing an app involving child-window. When the child window invokes a dialogbox, it switches focus to the main windows first, before poping up. Of course, when it closes, the child-window becomes underneath the main window. Is there a parameter I am suppose to set or something in order to maintain the proper z-order? Thanks, -- John |
From: Liam C. <cy...@gm...> - 2005-06-08 06:20:10
|
Hey man, At the end of your method which calls the dialog box i.e.=20 def foo(self, event): <some stuff> <dialog is called> <Dialog has finished, now call...> self.Raise() Try it, it may flicker, however. On 6/8/05, kim...@ya... <kim...@ya...= >=20 wrote: >=20 > Hello list, >=20 > I am writing an app involving child-window. When the > child window invokes a dialogbox, it switches focus to > the main windows first, before poping up. Of course, > when it closes, the child-window becomes underneath > the main window. >=20 > Is there a parameter I am suppose to set or something > in order to maintain the proper z-order? >=20 > Thanks, >=20 > -- > John >=20 >=20 > ------------------------------------------------------- > This SF.Net <http://SF.Net> email is sponsored by: NEC IT Guy Games. How= =20 > far can you shotput > a projector? How fast can you ride your desk chair down the office luge= =20 > track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=3D20 > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users >=20 --=20 'There is only one basic human right, and that is to do as you damn well=20 please. And with it comes the only basic human duty, to take the consequences.' |
From: <bra...@om...> - 2005-06-13 21:37:41
|
I've seen this same symptom on the Mac--it doesn't seem to happen on Windows, which explains why Alex hasn't see this problem. To avoid the flicker problem, I usually uncheck "Visible at Startup" in the Background Info dialog in resource editor for a child window, and then explicitly set self.visible=True right before the self.Raise() statement. Liame Clarke wrote on 06/08/2005 01:20:02 AM: > Hey man, > > At the end of your method which calls the dialog box i.e. > > def foo(self, event): > <some stuff> > <dialog is called> > <Dialog has finished, now call...> > self.Raise() > > Try it, it may flicker, however. > On 6/8/05, kim...@ya... < kim...@ya... > > wrote: > Hello list, > > I am writing an app involving child-window. When the > child window invokes a dialogbox, it switches focus to > the main windows first, before poping up. Of course, > when it closes, the child-window becomes underneath > the main window. > > Is there a parameter I am suppose to set or something > in order to maintain the proper z-order? > > Thanks, > > -- > John > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput > a projector? How fast can you ride your desk chair down the office luge track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users > > > > -- > '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.' |
From: Alex T. <al...@tw...> - 2005-06-08 12:31:47
|
kim...@ya... wrote: >Hello list, > >I am writing an app involving child-window. When the >child window invokes a dialogbox, it switches focus to >the main windows first, before poping up. Of course, >when it closes, the child-window becomes underneath >the main window. > > > That doesn't happen for me; this little sample below opens its main window, then a child window overlapping it; when you click on the button within the child, the child window stays above the main window with the dialog above the child. After the dialog is closed, the child remains on top and has focus. This might give you somewhere to start comparisons - or if you like, send the code that is misbehaving to me and I'll try to determine where the difference is. >Is there a parameter I am suppose to set or something >in order to maintain the proper z-order? > > > #!/usr/bin/python """ __version__ = "$Revision: 1.5 $" __date__ = "$Date: 2004/04/30 16:26:12 $" """ from PythonCard import model, dialog rsrc = {'application':{'type':'Application', 'name':'Template', 'backgrounds': [ {'type':'Background', 'name':'bgTemplate', 'title':'Standard Template with File->Exit menu', 'size':(400, 300), 'style':['resizeable'], 'menubar': {'type':'MenuBar', 'menus': [ {'type':'Menu', 'name':'menuFile', 'label':'&File', 'items': [ {'type':'MenuItem', 'name':'menuFileExit', 'label':'E&xit', 'command':'exit', }, ] }, ] }, 'components': [ {'type':'TextArea', 'name':'TextArea1', 'position':(52, 82), 'size':(205, 138), 'actionBindings':{}, 'text':'TextArea1', }, {'type':'TextField', 'name':'TextField1', 'position':(10, 10), 'size':(179, -1), 'actionBindings':{}, 'text':'TextField1', }, ] # end components } # end background ] # end backgrounds } } chldrsrc = {'application':{'type':'Application', 'name':'Template', 'backgrounds': [ {'type':'Background', 'name':'bgTemplate', 'title':'Standard Template with no menus', 'size':(400, 300), 'components': [ {'type':'Button', 'name':'btnDialog', 'position':(39, 25), 'actionBindings':{}, 'label':'testDialog', }, ] # end components } # end background ] # end backgrounds } } class myChild(model.Background): def on_initialize(self, event): # if you have any initialization # including sizer setup, do it here pass def on_btnDialog_mouseClick(self, event): result = dialog.singleChoiceDialog(self, "message", "title", ['one', 'two', 'three']) class MyBackground(model.Background): def on_initialize(self, event): # if you have any initialization # including sizer setup, do it here self.childWindow = model.childWindow(self, myChild, None, chldrsrc) self.childWindow.position = (250, 25) pass def on_TextField1_keyPress(self, event): print event.keyCode self.components.TextArea1.text = self.components.TextArea1.text + "%d\n" % (event.keyCode) pass if __name__ == '__main__': app = model.Application(MyBackground, None, rsrc) app.MainLoop() -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.6.2 - Release Date: 04/06/2005 |