package tree
{
import hebron.tinicell.components.V2Tree;
import mx.automation.delegates.controls.ListBaseContentHolderAutomationImpl;
import mx.controls.Button;
import mx.controls.listClasses.ListBaseContentHolder; // 감춰진 클래스를 사용하기 위해 임의로 임포트; 에러안남
import mx.core.mx_internal;
use namespace mx_internal;
public class AdvTestTree extends V2Tree
{
private var itemAddBtn:Button;
public function AdvTestTree()
{
super();
}
override public function get baselinePosition():Number {
trace("a");
return 50;
}
protected override function createChildren():void{
trace("top",viewMetrics.top);
//trace(baselinePosition);
super.createChildren();
//trace("baselinePosition",super.baselinePosition);
itemAddBtn = new Button();
itemAddBtn.label = "test";
itemAddBtn.visible = false;
itemAddBtn.width = 60;
itemAddBtn.height = 26;
itemAddBtn.x = 3;
itemAddBtn.y = 3;
this.addChild(itemAddBtn);
}
Called from the <code>updateDisplayList()</code> method to adjust the size and position of
* listContent.
override protected function adjustListContent(unscaledWidth:Number=-1, unscaledHeight:Number=-1):void {
viewMetrics.top = 40;
trace("top2",viewMetrics.top);
super.adjustListContent(unscaledWidth, unscaledHeight);
listContent.y = 50; // listBaseContentHolder 에 접근
listContent.height -= 50;
// listContent를 사용하지 않아도 위에서 임의로 임포트한 클래스를 사용해서 listContent를 사용할 수 있다.
var a:ListBaseContentHolder = new ListBaseContentHolder(this); // 감춰진 클래스를 임의로 임포트해서 사용가능..
}
}
}
{
import hebron.tinicell.components.V2Tree;
import mx.automation.delegates.controls.ListBaseContentHolderAutomationImpl;
import mx.controls.Button;
import mx.controls.listClasses.ListBaseContentHolder; // 감춰진 클래스를 사용하기 위해 임의로 임포트; 에러안남
import mx.core.mx_internal;
use namespace mx_internal;
public class AdvTestTree extends V2Tree
{
private var itemAddBtn:Button;
public function AdvTestTree()
{
super();
}
override public function get baselinePosition():Number {
trace("a");
return 50;
}
protected override function createChildren():void{
trace("top",viewMetrics.top);
//trace(baselinePosition);
super.createChildren();
//trace("baselinePosition",super.baselinePosition);
itemAddBtn = new Button();
itemAddBtn.label = "test";
itemAddBtn.visible = false;
itemAddBtn.width = 60;
itemAddBtn.height = 26;
itemAddBtn.x = 3;
itemAddBtn.y = 3;
this.addChild(itemAddBtn);
}
Called from the <code>updateDisplayList()</code> method to adjust the size and position of
* listContent.
override protected function adjustListContent(unscaledWidth:Number=-1, unscaledHeight:Number=-1):void {
viewMetrics.top = 40;
trace("top2",viewMetrics.top);
super.adjustListContent(unscaledWidth, unscaledHeight);
listContent.y = 50; // listBaseContentHolder 에 접근
listContent.height -= 50;
// listContent를 사용하지 않아도 위에서 임의로 임포트한 클래스를 사용해서 listContent를 사용할 수 있다.
var a:ListBaseContentHolder = new ListBaseContentHolder(this); // 감춰진 클래스를 임의로 임포트해서 사용가능..
}
}
}
'Flex Tree' 카테고리의 다른 글
XML TREE 해당 노드찾아 열기 (0) | 2008.01.23 |
---|---|
Tree 아이템 오픈시 스크롤바가 제대로 안생길 경우 (1) | 2007.10.25 |
Tree 컴포넌트 생성시 트리 아이템 열기 FlexEvent.UPDATE_COMPLETE, expandItem (1) | 2007.09.03 |
Tree 아이템에 itemRenderer의 인덱스 가져오기 (0) | 2007.08.17 |
Tree 아이템의 우클릭시 아이템 선택하기 (0) | 2007.06.19 |
Tree 해당 노드에 자식 아이템이 있는지 검사 (0) | 2007.06.06 |
[Tree] saveXml.as (0) | 2007.06.04 |
[Tree] TreeModel.as (0) | 2007.06.04 |
[Tree] sPanel.as (2) | 2007.06.04 |
[Tree] sBind.as (0) | 2007.06.04 |