Labels

Sunday, December 6, 2009

Flex: HBox implementation in reverse order

Implement below given code and see the magic. Your HBox will display its children in reverse order. Same can be done for VBox and other containers.

package com
{
import flash.display.DisplayObject;

import mx.containers.HBox;

public class MyHBox extends HBox
{
public function MyHBox()
{
super();
}

public override function addChild
(child:DisplayObject):DisplayObject
{
this.addChildAt(child,0);
return child
}

}

}

0 comments:

Post a Comment