[Gnocl -the Tcl/Gtk Bindings] gnocl::tree & gnocl::list -highlighting columns
5 views
Skip to first unread message
William J Giddings
unread,
Nov 9, 2013, 6:49:34 AM11/9/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gn...@googlegroups.com
Its possible to use Ctrl-F to launch an interactive search of entries contained within a tree or list view. Prior to any search, however, the column needs to be preselected. This mornings coding session has fixed a couple of issues within the gnocl core modules to enable this process to be done interactively under Tcl control. A single click on a cell in an view can now result in the column being preselected and highlighted. The following example script shows how its done. Get the nightly build for all the updates.
# test-me.tcl #!/bin/sh # the next line restarts using tclsh \ exec tclsh "$0" "$@"
package require Gnocl
set chn2indic:mappings(conjuncts) { 阿呵 āha 阿訶 āha 爍鉢 śva 悉吉利 skri 室佛 śva 地利 dhri 穆帝 mukta 佛囉 pra 帝利 tre }
#--------------- # view and edit specific lists #--------------- # proc chn2indix:view:call_back {w c} { set last [$w cget -searchColumn] $w columnConfigure $last -background white $w columnConfigure $c -background grey $w configure -searchColumn $c
# force window refresh, Gtk+ has some internal issues here! if {$last != $c} { [gnocl::winfo toplevel $w ] grabFocus } }
#--------------- # view and edit specific lists #--------------- # proc chn2indix:view { set } {
global chn2indic:mappings
set vbox [gnocl::vBox] set tbar [gnocl::toolBar] set lst [gnocl::list -types {string string} -baseFont {Sans 14} -data {0} ] set hbox [gnocl::hBox ] set but(1) [gnocl::button -text Accept] set but(2) [gnocl::button -text Cancel] set stat [gnocl::statusBar]