Re: [Java-gnome-developer] CellRenderer, setEditable
Brought to you by:
afcowie
From: Manuel C. <ll...@us...> - 2005-12-10 14:22:04
|
Hi Joao, It works! You don't even have to make it editable, as it works by default if you don't disable it (setUserEditable(false)). CellRendererToggle render = new CellRendererToggle(); render.addEventHandler("toggled", "toggleEdited", this); public void toggleEdited (String path) { TreeIter iter = treeStore.getIter(path); boolean b = treeStore.getValue(iter, toggle_column); treeStore.setValue(iter, toggle_column, !b); } Thanks! Joao Victor wrote: > This guy had the same doubt, take a look at the example provided there: > > http://mail.gnome.org/archives/gtk-list/2003-September/msg00202.html > > Basically, he connected the 'toggled' signal so he would change the value of the toggle when the > user clicks on it. I think that should solve it. |