Reputation: 993
I'd like to create a window which is not allowed to move. Is this possible?
Upvotes: 0
Views: 509
Reputation: 779
Alternatively, if you want to still have the system Chrome and everything, you can listen for the NativeWindowBoundsEvent that you don't want (NativeWindowBoundsEvent.MOVE, RESIZE, etc) and make a listening function like this...
private function onWindowBoundsChange(evt:NativeWindowBoundsEvent):void {
evt.preventDefault();
}
That way, you could turn it on or off whenever you want.
Upvotes: 0
Reputation: 1768
You might also set NativeWindow.x/y to same value in ENTER_FRAME for example.
Upvotes: 0
Reputation: 5960
You need to make sure these are set in your application.xml
<systemChrome>none</systemChrome>
<minimizable>false</minimizable>
<maximizable>false</maximizable>
<resizable>false</resizable>
Otherwise on windows you can hit the windows key + arrow to minimise / move the window around.
Upvotes: 0
Reputation: 1350
You just create a NativeWindow with it's systemChrome
property set to NativeWindowSystemChrome.NONE
. That way there is no possibility to move the window by native methods (dragging the title bar, etc.).
Upvotes: 1