
Hi Jan, You don’t say what the data in the table is, but one would normally deal with this by responding to the attribute change in the data rather than intercepting the table trying to set the attribute. For instance, if your data is an attribute then change it into a property so that you can perform additional actions when the attribute is changed. Again, I don’t know what your data is or what level of control you have over it, so I’m offering suggestions in the dark here. —Eric
On Oct 16, 2015, at 2:55 PM, Jan Kosinski <kosinski@embl.de> wrote:
Hi again,
How to attach handlers to checkboxes in the CGLtk SortableTable so the handler is invoked automatically when the checkbox is (un)checked?
I get it working by subclassing and overriding _widgetCB as below but maybe you have sth more convenient?
class ComponentSortableTable(SortableTable): def __init__(self,parent,*args,**kwargs): SortableTable.__init__(self,parent,*args,**kwargs)
def _widgetCB(self, datum, column, newVal=None): SortableTable._widgetCB(self, datum, column, newVal=newVal) <my code if column.title == ‘show’: …
Thanks, Jan _______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev