Changeset 642ac37 in tol for tolbase/lib
- Timestamp:
- Nov 6, 2008, 5:26:48 PM (18 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 3e755e5
- Parents:
- 0295b9a
- File:
-
- 1 edited
-
tolbase/lib/byswidget/btreeview/btreeview.tcl (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tolbase/lib/byswidget/btreeview/btreeview.tcl
r0295b9a r642ac37 35 35 # bonselcmd -> comando a ejecutar cuando se selecciona un nodo 36 36 # bhelptext -> columna que se muestra como helptext 37 # btogglehier -> cambiar jerárquicamente si un item está o no seleccionado 37 38 #///////////////////////////////////////////////////////////////////////////// 38 39 variable items_selected … … 45 46 option -bhelptext 46 47 option -bmenu 48 option -btogglehier true 47 49 #/////////////////////////////////////////////////////////////////////////// 48 50 constructor {args} { … … 66 68 $self configure -hideroot yes -linewidth 0 -activeicons "" \ 67 69 -selectbackground gray90 -selectforeground black \ 68 -highlightthickness 1 -borderwidth 0 -selectborderwidth 0\70 -highlightthickness 1 -borderwidth 1 -selectborderwidth 1 \ 69 71 -font $toltk_options(fonts,Label) -icons {} 70 72 … … 295 297 array set aryData [$self entry cget $index -data] 296 298 set state $aryData(state) 299 300 set ctogglehier [$self cget -btogglehier] 297 301 298 302 if { [string equal $state NSE] } return … … 301 305 if { [string equal $state ON] } { 302 306 $self _SetNodeState $index OFF 303 $self ToggleUp $parent_idx OFF ON 304 $self entry configure $index -data [list childsON 0 childsMED 0] 305 foreach it [$self entry children $index] { 306 $self ToggleDown $it OFF 307 } 307 if $ctogglehier { 308 $self ToggleUp $parent_idx OFF ON 309 $self entry configure $index -data [list childsON 0 childsMED 0] 310 foreach it [$self entry children $index] { 311 $self ToggleDown $it OFF 312 } 313 } 308 314 } else { 309 315 $self _SetNodeState $index ON 310 $self ToggleUp $parent_idx ON $state 311 $self entry configure $index\ 312 -data [list childsON [$self entry size $index] childsMED 0] 313 foreach it [$self entry children $index] { 314 $self ToggleDown $it ON 315 } 316 if $ctogglehier { 317 $self ToggleUp $parent_idx ON $state 318 $self entry configure $index\ 319 -data [list childsON [$self entry size $index] childsMED 0] 320 foreach it [$self entry children $index] { 321 $self ToggleDown $it ON 322 } 323 } 316 324 } 317 325 } … … 500 508 .top.tf1.f.btv bColumnInsert end Type 501 509 #RellenaBTreeView root [file join [info dir script] testdir] 502 RellenaBTreeView root "./byswidget/btreeview/testdir" 510 #RellenaBTreeView root "./byswidget/btreeview/testdir" [jym: se cambia para que no falle] 511 RellenaBTreeView root "c:/UnxUtils" 503 512 grid .top.tf1.f.btv -row 0 -column 0 -sticky new 504 513 grid columnconfigure .top.tf1.f 0 -weight 1
Note: See TracChangeset
for help on using the changeset viewer.
