PDA

View Full Version : Stop Window moving forward upon click


kmeixner
09-06-2008, 03:00 PM
Hi,

I am trying to figure out how to disable the feature of a window where if you click on it or one of it's child elements it comes to the front on top of other windows.

One way I attempted was to make the window I want on top modal but there is some strange behaviour in my application where this will not work see post
http://forum.openlaszlo.org/showthread.php?t=12290
(Note: Even when I call LzModeManager.makeModal(myWin) from the debugger the other windows will still come forward on top of myWin for some reason if the window sub-components are clicked, even though LzModeManager.hasMode(myWin) returns true).

Aside from making the window I want in front modal, is there another way to
stop other windows from moving themselves forward when the windows or their sub-components are clicked?

My application is being compiled in version 3.4.0 SWF8.

Thanks,

Kevin

kmeixner
09-06-2008, 03:43 PM
Okay, I figured out a hack to do this. I override the bringToFront() method of the windows that I did not want to come to the front to only come to the front if they confirm that the modal window that is misbehaving is not set to modal:

<method name="bringToFront">
if (LzModeManager.hasMode(myWin)){
return;
}
else {
super.bringToFront();
}
</method>