head	1.1;
access;
symbols;
locks
	root:1.1; strict;
comment	@# @;


1.1
date	2009.12.07.04.56.35;	author root;	state Exp;
branches;
next	;


desc
@/opt/nforge/var/wiki/easylogiclib/data/text/WBTreeView
@


1.1
log
@118.219.84.10;;cyberuls easylogic ;;
@
text
@= Description = 
 * TreeView 클래스를 구현한다. 
 * [WBTreeNode] 객체를 사용하여 Node 를 제어한다.

= Sample =

{{{#!vim php 

<?php

/*
 * WBListView example, winbinder 
 *
 * written by easylogic 
 * 
 */

$window = new WBResizableWindow(array(
	'title'		=> 'WBTreeView Example ',
	'width'		=> 500,
	'height'	=> 400,
	'layout'	=> new WBGridLayout()
));

$treeview = $window->add(array(
	'wbtype'	=> 'TreeView',
));

$root = $treeview->createRoot(array(
	'caption' => '안녕',
	'value' => 'fdksalf',
));

$root->setText($root->getText() . "(".$root->getLevel().")");

$child = $root->createChild(array(
	'caption' => '자식 노드',
));

$sibling = $child->createSibling(array(
	'caption' => '자식의 형제노드',
));

$child2 = $child->createChild(array(
	'caption' => '자식의 자식 노드',
));

//echo $child->getText();

$child->setText($child->getText() . "(".$child->getLevel().")");
$sibling->setText($sibling->getText() . "(".$sibling->getLevel().")");
$child2->setText($child2->getText() . "(".$child2->getLevel().")");

//echo $root->getLevel();

echo $sibling->getParent()->getText();

$root->expand();

$child->select();
$sibling->select();
$child2->select();

$child->delete();

$root->createChild(array(
	'caption' => '메롱'
));


$root->select();

echo $root->getSelectedValue();

$window->setVisible(true);

WBApplication::start();

?>

}}}
@
