Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

blt treeview issue
I cannot get the treeview hide and show to work
properly with tagged nodes for blt 2.4z.

here is an example:
---------------------------------------------------------
#! wish

set auto_path "/ldas/lib $auto_path"

package require BLT

proc showSpecific { page } {
puts "button $::showSpecific($page)"
if  { $::showSpecific($page) } {
eval $::treeview_resourcevars($page) hide -name ::API_LIST
} else {
eval $::treeview_resourcevars($page) show -name ::API_LIST
}
update idletasks
}

set page ligolw
set ::tree_resourcevars($page) [ blt::tree create tree_resourcevars_$page ]

set namelist { \
::API_LIST {list of API's to connect to } no {manager diskcache frame
metadata ligolw datacond mpi eventmon cntlmon} \
{manager diskcache frame metadata ligolw datacond mpi eventmon cntlmon} \
{{set ::API_LIST [ list manager diskcache frame metadata ligolw
datacond mpi eventmon cntlmon ]}} {} {set ::API_LIST} {GLOBAL} \
::BASEPORT {port from which LDAS API ports are based } no 10000 10000
{{set ::BASEPORT 10000}} {} {set ::BASEPORT} {GLOBAL} \
::LIGOLW_MAX_JOB_TIME {time out for job if no data arrives (msecs)} yes
100000 100000 {{set ::LIGOLW_MAX_JOB_TIME 100000}} {}
{set::LIGOLW_MAX_JOB_TIME} {ligolw} \
}

foreach { name desc mod curvalue origvalue line indices pattern tag }
$namelist {
;## remove the list braces and leading and trailing spaces

$::tree_resourcevars($page) insert root -label $name -data \
[ list desc $desc \
mod $mod \
curvalue $curvalue \
origvalue $origvalue line [ list $line ] \
indices $indices pattern $pattern ] -tags $tag
}


set chk [ checkbutton .specific -text "Show API specific resource only" \
-variable ::showSpecific($page) -onvalue 1 -offvalue 0 \
-width 20 -justify left -anchor w \
-command "showSpecific $page" ]

set ::treeview_resourcevars($page) [ blt::treeview .resourcevars$page \
-tree $::tree_resourcevars($page) -background gray -foreground
brown \
-bg PapayaWhip -font courier -relief raised -flat 1 -icons {}
-activeicons {} ]

$::treeview_resourcevars($page) sort auto 1
set i 0
;## add columns headers for data values
foreach item { desc mod curvalue origvalue } {

if  { [ string match curvalue $item ] } {
$::treeview_resourcevars($page) column insert $i $item
-justify left -text $item -edit 1 -pad 10 \
-------------------------------------------------------

When I toggle the checkbutton, either all the nodes are hidden or
all are exposed instead of hiding or showing the ones with tag
GLOBAL.

Is this a bug ?

Report this thread to moderator Post Follow-up to this message
Old Post
Mary Lei
04-27-05 01:58 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Tcl archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:31 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.