#!/bin/sh
#
# Beispiele für Basiswidget aus den BWidgets
#
# Carsten Zerbst,
[email protected]
# \
exec /usr/local/bin/wish8.3 $0 $@
lappend auto_path [file join [pwd] BWidget-1.4.1]
package require BWidget 1.4.1
proc auswahlAktualisieren {} {
.combo configure -values [glob -nocomplain *]
}
proc wertÄndern {} {
set index [.combo getvalue]
set auswahl [.combo cget -values]
.wert configure -text [lindex $auswahl $index ]
}
ComboBox .combo -postcommand auswahlAktualisieren \
-modifycmd wertÄndern \
-editable false \
-entrybg white
label .wert
grid .wert .combo -sticky ew -padx 10
auswahlAktualisieren
combo setvalue @0
wertÄndern
wm title . "ComboBox"