tags:

views:

573

answers:

3

Hello, folks!

Here is the problem. I've created custom RectangularBorder and set it as border skin for TitleWindow. After this manipulation inner content of window is starting at 0,0 point of it. How could I set offset of it?

Just setting top padding does not work because scroll bar still begins from the top of the window after this manipulation.

A: 

try to use padding-top , padding-left etc as a style for your TitleWindow

Adrian Pirvulescu
+1  A: 

There are lots of problems with trying to skin panels in Flex 3, and TitleWindow inherits from Panel.

This is the best explanation I've seen. (I'm not the same Glenn referenced in the italics :)).

Glenn
+1  A: 

For programmatic skin it went out pretty simple. One should override function get borderMetrics to do so:

public override function get borderMetrics():EdgeMetrics
{
    var borderThickness:Number = getStyle("borderThickness");
    var cornerRadius:Number = getStyle("cornerRadius");   
    var headerHeight:Number = getStyle("headerHeight");

    return new EdgeMetrics(
        borderThickness,  
        borderThickness + headerHeight,
        borderThickness,
        borderThickness);     
 }
Artem Tikhomirov
I wish this was clear from the documentation! Thanks so much Artem.
quoo
Yes, me too. I've recently started to read their code much more often, thin reading their documentation. It's messier, but helps.
Artem Tikhomirov