Changeset cc64b09 in tol for tolbase/lib/byswidget/blistboxplus/blistboxplus.tcl
- Timestamp:
- Nov 24, 2016, 11:58:38 AM (10 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- f738c05
- Parents:
- 6dc91d2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tolbase/lib/byswidget/blistboxplus/blistboxplus.tcl
r6dc91d2 rcc64b09 159 159 160 160 # bind 161 #@!bind 161 162 #@T! $_listbox bind all <KeyPress> +[list $self _OnKeyPress %A] 162 163 #@T! to do 164 bind $_listbox <KeyPress> +[list $self _OnKeyPress %A] 163 165 164 166 $self configure -nomenu [from args -nomenu] … … 429 431 bind $_listbox <Shift-End> "$self addAllNext" 430 432 bind $_listbox <Button-1> +[list focus -force %W] 431 }432 433 #@//////////////////////////////////////////////////////////////////////////434 method bind { args } {435 #436 # PURPOSE: modifies a particular case of bind437 #438 #///////////////////////////////////////////////////////////////////////////439 if { [lindex $args 1] eq "<Selection>" } {440 #@T no se usa441 return [eval $_listbox notify bind $args]442 } else {443 return [bind $_listbox.frameTree.t [lindex $args 1] [lindex $args 2]]444 }445 433 } 446 434 … … 887 875 return $result 888 876 } else { 889 #@T! return [eval $_listbox curselection]890 877 return [$self curselection] 891 878 } … … 916 903 foreach dats $args { 917 904 set datos [list [lindex $cols 0] $dats] 918 #@ T! $_listbox insert $pos $currentId -data $datos905 #@ Crea y completa los datos de un nodo 919 906 set node [$_listbox item create -parent root -button 0 -open 0] 920 907 eval $_listbox item text $node $datos … … 934 921 incr i 935 922 } 936 #@ T! $_listbox insert $pos $currentId -data $datos937 set node [$_listbox item create -parent root -button 0 -open 0] ;# -parent $pos923 #@ Crea y completa los datos de un nodo 924 set node [$_listbox item create -parent root -button 0 -open 0] 938 925 eval $_listbox item text $node $datos 939 926 if { $options(-icon) != "" } { … … 970 957 #/////////////////////////////////////////////////////////////////////////// 971 958 if { "-1" eq [lsearch $args 0] } { 972 #@T! eval $_listbox delete $args973 959 eval $_listbox item delete $args 974 960 } else { … … 997 983 #/////////////////////////////////////////////////////////////////////////// 998 984 if { $ids eq "" } { 999 #@T! return [lrange [$self find] 1 end]1000 985 set items [$_listbox item children root] 1001 Tolcon_Trace "items $items" 1002 return $items ;#?? 986 return $items 1003 987 } 1004 988 … … 1010 994 1011 995 foreach id $ids { 1012 1013 set elem {} 1014 1015 #@T! set data [$_listbox entry cget $id -data] 1016 #@T! foreach col $cols { 1017 #@T! set inx [lsearch $data $col] 1018 #@T! if { "-1" ne $inx } { 1019 #@T! incr inx 1020 #@T! lappend elem [lindex $data $inx] 1021 #@T! } 1022 #@T! } 1023 996 set elem {} 1024 997 foreach col $cols { 1025 998 lappend elem [$_listbox item text $id $col] 1026 999 } 1027 1028 1000 lappend result $elem 1029 1001 } … … 1032 1004 return [lindex $result 0] 1033 1005 } 1034 Tolcon_Trace "get result: $result"1006 1035 1007 return $result 1036 1008 } … … 1057 1029 incr i 1058 1030 } 1059 #@T! return [$_listbox entry configure $id -data $datos]1060 1031 return [eval $_listbox item text $id $datos] 1061 1032 }
Note: See TracChangeset
for help on using the changeset viewer.
