Here is a TitleWindow manager class that I put together to manage my CustomTitleWindows. It is basically the same as the MDI Manager class in the MDI framework, except my manager class works with the new TitleWindows in Flex 4. Also, my manager class only detects TitleWindows that are created by Flex's PopUpManager class. It has the following features:
- Enforce Boundaries
- This feature basically doesn't allow the user to drag the TitleWindow outside the bounds of the application.
- I also added a new feature that you can turn on called "soft boundaries". This allows the user to drag the window outside the application bounds, but then snaps back into the application once the window is let go. The snapping back can be animated if you choose.
- Snapping
- This feature is exactly the way it works in the MDI framework, but I just modified it to work with the new Flex 4 TitleWindows.
- I also added a new feature that you can turn on called "snapToEdges". This allows the windows to not only snap to other windows, but also to the edges of the application.
Enough talking, click the link below to view the sample.
View Sample (right click the sample to view source)
0 comments:
Post a Comment