Hierarquical listbox

Silas - 2005.08.24 - Here one code I used in one of my applications: I call this hierarquical listbox, because when you select one item of the left listbox (Parent) it changes all items of the right one (Child).

  bind Listbox <<ListboxSelect>> {
    set index [.lstPattern curselection]
    puts index
    set Child [lindex $Everything $index]
  }

  listbox .lstPattern -listvariable Pattern
  listbox .lstChild -listvariable Child
  pack .lstPattern .lstChild -side left

  set Pattern {one two three}
  set Everything {{child2 another blabla} {child2 go blabla} {child3 {another row}}}

hierarchical - definition of hierarchical by the Free Online Dictionary, Thesaurus and Encyclopedia

Adj. 1. hierarchical - classified according to various criteria into successive levels or layers; "it has been said that only a hierarchical society with a leisure class at the top can produce works of art"; "in her hierarchical set of values honesty comes first" hierarchal, hierarchic