Sunday, November 22, 2009

Yet Another Resizable TitleWindow

Was kinda ticked that TitleWindow did not have a resizable property :-( Found this reference when I googled "ResizableTitleWindow" - but was way too heavy. I just needed a _simple_ resizable title window, where I can grab the lower right corner and drag it to resize the window. Then I remembered that flexlib has a MDI package and I was always impressed with the code quality :-) Found the most excellent code for the MDIWindow component with resizable behaviour and additional features that I did not need. Here is my yet simplified derived version. And like usual, you can down the source code from here. BTW, I leave it as an "exercise" to the reader to add a visual element to the title window to indicate that it is resizable.


Harley said...

thanks, this is a nice assignment... I have been using a superpanelplus class (see and which created superpanel which can be traced from your reference

all sites above have aged and the coding may not be kept up to date with flex versions. So careful. I didn't know about MDI package in flexlib, i had only try'd to use it for the base 64 image, so glad that you bring this up and i will try to remember this.

"TitleWindow" and "superpanelplus" (SSP) both extends "panel"
The title window was intended to be used as a popup window, and allows for being modal or not.

The SSP allows for a floating panel with features for resizing, maximize, and minimizing the panel; complete with icons to see the lower right corner and max, minimize, and close buttons, but not modal...

Since SSP has some issues, straight out of the box, I think it might be better, as you have done, to extend the titleWindow, and pull the needed features from the SSP code.

However, what confuses me with the "TitleWindow" is that it uses the popupmanager... so will your extended version be able to make multiple windows by using mxml each with it's own children?

DaddyDog said...

Thanks a bunch, helps a bunch