# SwitchBox sample

    source ../../oo.tcl

    @import core.*
    @import gui.*

    wm geometry . "300x200"

    set box [SwitchBox new]

    $box label: "This is a SwitchBox widget"

    $box list: {
      debug 1
      "show trace after execution" 0
      "exit on error" 1
    }

    if {![$box contains: "show all"]} {
      $box add: "show all"
    }

    if {![$box valueOf: "show all"]} {
      $box switchOn: "show all"
    }

    $box sort

    $box onChange: {
      puts stderr "$selection changed to [$self valueOf: $selection]"
    }

    $box show