Re: [Java-gnome-developer] TreeView/List Current Row
Brought to you by:
afcowie
From: Mark H. <mh...@ca...> - 2003-12-28 05:15:45
|
Hi, When creating a new topic please hit new, not reply. When you hit reply, an In-Reply-To header is added to your message. Many email clients will group together related messages in a threaded view based on this information. On Sat, Dec 27, 2003 at 10:02:33AM +0000, Andrew wrote: > I have looked through the examples, and I am silly enough not to work > out how to get the current row selected in a treeview/listview. > Is there actually an example, if not, could someone show me how this is > done? We should probably add a method for this to java-gnome. Please file a bug report for it. In my applications, I have added a listener to the selection of the treeview: pkgView.getSelection().addListener( watchSelectionChange ); private TreeSelectionListener watchSelectionChange = new TreeSelectionListener(){ public void selectionChangedEvent(TreeSelectionEvent event){ TreeSelectionForEach fe = new TreeSelectionForEach(){ public void forEach(TreeModel model, TreePath path, TreeIter iter){ ... } }; pkgView.getSelection().forEachSelected(fe); } }; > Also, is the cromagnon application included in the 0.82 release? I have > it on my pc at home which is an older release (0.8 or 081 I think), > however the file structure seems to have changed A LOT in this more > recent release. Are you subscribed to java-gnome-announce? I did explain the file structure changes in an announcement of 0.8.2 release. cromagnon is not included in 0.8.2. It is a little too big for an example app; and if it is to survive, it should be developed in it's own project. -- .''`. Mark Howard : :' : `. `' http://www.tildemh.com `- mh...@de... | mh...@ti... | mh...@ca... |