Here’s a Flex 4 version of the post I wrote a few weeks ago on how to add buttons to a TitleWindow, in this case for a Spark TitleWindow component:

package
{
    import mx.controls.LinkButton;
    import spark.components.TitleWindow;

    public class CustomTitleWindow extends TitleWindow
    {
        private var helpButton : LinkButton;

        public function CustomTitleWindow ()
        {
            title = "Custom TitleWindow";
        }

        override protected function createChildren () : void
        {
            super.createChildren ();

            if (! helpButton)
            {
                helpButton = new LinkButton ();
                helpButton.label = "Help";
                helpButton.focusEnabled = false;
                helpButton.setStyle ("paddingTop", 4);

                this.addElement (helpButton);
                helpButton.owner = this;
            }
        }

        override protected function updateDisplayList (w : Number,
                    h : Number) : void
        {
            super.updateDisplayList (w, h);

            var width : Number =
                helpButton.getExplicitOrMeasuredWidth ();
            var height : Number =
                helpButton.getExplicitOrMeasuredHeight ();

            var x : Number = w – width – 28;
            var y : Number = -28;

            helpButton.setActualSize (width, height);
            helpButton.move (x, y);
        }

    }
}


As you can see, the process isn’t exactly the same in Flex 4 but it’s still pretty straightforward. You add your button(s) directly to the component, and size and position them absolutely.