#!/bin/sh
# ----------------------------------------------------------------------
#  DEMO: tabset in [incr Widgets]
# ----------------------------------------------------------------------
#\
exec itkwish "$0" ${1+"$@"}
package require Iwidgets 3.0

# itkwish interprets the rest...
# ----------------------------------------------------------------------
proc showTab {num} {
    puts "selected: [.ts tabcget $num -label]"
}

iwidgets::tabset .ts -command showTab
pack .ts

for {set i 1} {$i <= 5} {incr i} {
    .ts add -label "#$i"
}
.ts select 0