Topic: 怎样才能让treeitem可以双击打开下一层节点?

  Print this page

1.怎样才能让treeitem可以双击打开下一层节点? Copy to clipboard
Posted by: yueguangm
Posted on: 2004-10-19 09:36

请教:
使用swt designer,建立一个tree控件。我可以为它添加
tree.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {。。。
这样的事件监听。但我现在想双击上一级节点,就能展开它的下一级节点,不知道该怎么写这个监听事件。

麻烦各位了。

2.Re:怎样才能让treeitem可以双击打开下一层节点? [Re: yueguangm] Copy to clipboard
Posted by: floater
Posted on: 2004-10-19 10:22

that's the default, right?

3.Re:怎样才能让treeitem可以双击打开下一层节点? [Re: yueguangm] Copy to clipboard
Posted by: kylin
Posted on: 2004-10-19 10:40

tree.addTreeSelectionListener(new TreeSelectionListener() {
public void valueChanged(TreeSelectionEvent e){
//add your code
}
}

4.Re:怎样才能让treeitem可以双击打开下一层节点? [Re: yueguangm] Copy to clipboard
Posted by: kavinwang
Posted on: 2004-10-19 21:30

这个问题算是解决了,不知是否还有问题。


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923