The gnocl::tree and gnocl::list widgets automatically set tick boxes for columns identified as containing boolean data. The present distribution (0.9.96) will cause a warning if a tree view is created, data added but no callback script set for the column containing the toggle item. Furthermore, the Gtk library code does not automatically toggle the cell widget anyway! This is something to add into the gnocl core and so I've added this to the 'todo' list.
So, when a script has the following type of widget declaration...
set tree [gnocl::tree \
-treeLines 1 \
-ruleHint 1 \
-types {string boolean} \
-titles {"Mapping Source" "Select"}]
Make sure that this configuration follows immeadiately...
$tree columnConfigure 1 -onToggled {
if { [%w get %p %c] } {
%w cellConfigure %p %c -value 0
} else {
%w cellConfigure %p %c -value 1
}
}
So, when a script has the following type of widget declaration...
set tree [gnocl::tree \
-treeLines 1 \
-ruleHint 1 \
-types {string boolean} \
-titles {"Mapping Source" "Select"}]
Make sure that this configuration follows immeadiately...
$tree columnConfigure 1 -onToggled {
if { [%w get %p %c] } {
%w cellConfigure %p %c -value 0
} else {
%w cellConfigure %p %c -value 1
}
}
Comments