pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From weisswu...@gmx.net
Subject Problems with setSelectedPath and TreeView
Date Mon, 03 May 2010 14:40:10 GMT
Hi!

I've got a searchfunction for elements in my treeview.
The result of the search function is a path to the searched node.

The problem now is, that the treeView doesn't want's to expand the branch and set the selection.

Even resetting the actual selection doesn't work.

public void buttonPressed(Button button) {
	String term = searchTerm.getText();
	if(term.trim().length() == 0)
		return;
	//Path path = searchById(term);
	//Path path = new Path(0,0,0,1);
	Path path = treeView.getSelectedPath();
	//Alert.alert("Hab da was: " + path.toString(), window.getDisplay());
	if(path != null) {
		treeView.collapseAll();
	        treeView.expandBranch(path);
	        treeView.setSelectedPath(path);
		}
	}

As result I see a completely collapsed tree.

What's wrong?

thx!
-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

Mime
View raw message