Posted to tcl by schelte at Fri Jul 14 10:48:44 GMT 2017view raw

  1. proc detached {tv item} {
  2. while {[set parent [$tv parent $item]] ne ""} {set item $parent}
  3. return [expr {[lindex [$tv children {}] [$tv index $item]] ne $item}]
  4. }
  5.