swt tree怎么去掉虚线呢?
RT..
谢谢!~~~
[解决办法]
你看这样行不行:
import org.eclipse.swt.SWT;import org.eclipse.swt.layout.FillLayout;import org.eclipse.swt.widgets.Display;import org.eclipse.swt.widgets.Shell;import org.eclipse.swt.widgets.Tree;import org.eclipse.swt.widgets.TreeItem;public class TreeSample { public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new FillLayout()); Tree tree = new Tree(shell, SWT.FULL_SELECTION ); TreeItem root = new TreeItem(tree, SWT.NULL); root.setText("root"); for (int i = 0; i < 10; i++) { TreeItem item = new TreeItem(root, SWT.NULL); item.setText("Item"+i); } shell.open(); while (!shell.isDisposed()) if (!display.readAndDispatch()) display.sleep(); display.dispose(); }}