Okay, I got it: root.setState(true, true);
On Nov 12, 7:13 pm, Saj <[email protected]> wrote: > Hi All, > > I have one Tree with a TreeItem "root". "root" has several child > items. The default is the children of "root" not being displayed. In > other words "root" is closed. > > How do I display "root" being open with its children being displayed. > I thought that if I add the line "root.setState(true);" that this > would do the trick but no luck. Any ideas. My simple OnModuleLoad > code from the example follows below. > > Thanks. > Saj > > public void onModuleLoad() { > RootPanel rootPanel = RootPanel.get(); > TreeItem root = new TreeItem("root"); > root.setState(true); > root.addItem("item0"); > root.addItem("item1"); > root.addItem("item2"); > > // Add a CheckBox to the tree > TreeItem item = new TreeItem(new CheckBox("item3")); > item.setVisible(true); > > root.addItem(item); > Tree t = new Tree(); > t.addItem(root); > rootPanel.add(t); > > } -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=.
