[Gnocl -the Tcl/Gtk Bindings] gnocl::tree issues around toggling booleans

2 views
Skip to first unread message

William J Giddings

unread,
Nov 8, 2013, 6:26:26 AM11/8/13
to gn...@googlegroups.com
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 is a tree view is created, data added but no callback script set for the column. 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 {
        puts "HIDIHI %w %p %c"
        if { [%w get %p %c] } {
            %w cellConfigure %p %c -value 0
            } else {
            %w cellConfigure %p %c -value 1
            }
        }





--
Posted By William J Giddings to Gnocl -the Tcl/Gtk Bindings on 11/08/2013 11:25:00 am
Reply all
Reply to author
Forward
0 new messages