- 积分
- 3638
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-10-21
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
树形表的组件窗口、根枝叶都是由widget_tree生成,他们的区别在于父子关系不同
/FOLDER表示该节点是个“文件夹节点”,里面是包含子节点的
/EXPANDED表示可以对该“文件夹节点”进行展开和折叠
/FOLDER和/EXPANDED应该是搭配使用,文件夹节点岂能不允许打开!
wTLB = WIDGET_BASE(/COLUMN, TITLE='title')
wTree = WIDGET_TREE(wTLB)
wtRoot = WIDGET_TREE(wTree, VALUE='root', /FOLDER, /EXPANDED)
wtLeaf11 = WIDGET_TREE(wtRoot, VALUE='leaf', $
UVALUE='LEAF')
wtBranch12 = WIDGET_TREE(wtRoot, VALUE='branch', $
/FOLDER, /EXPANDED)
wtLeaf121 = WIDGET_TREE(wtBranch12, VALUE='leaf', $
UVALUE='LEAF')
wtLeaf122 = WIDGET_TREE(wtBranch12, VALUE='leaf', $
UVALUE='LEAF')
wtLeaf13 = WIDGET_TREE(wtRoot, VALUE='leaf', $
UVALUE='LEAF')
wtLeaf14 = WIDGET_TREE(wtRoot, VALUE='leaf', $
UVALUE='LEAF')
;下面这个按钮不在树形表内
wDone = WIDGET_BUTTON(wTLB, VALUE="press", UVALUE='DONE')
WIDGET_CONTROL, wTLB, /REALIZE
|
|