Posted to tcl by jeremy_c at Thu Sep 13 18:42:07 GMT 2007view pretty

proc change_text {name text} {
	$name configure -text $text
}

proc create_dropdown {name current options} {
	ttk::menubutton $name -width 15
	set tm [menu $name.menu]
	foreach opt_name $options {
		$tm add command -label $opt_name -command [list change_text $name $opt_name]
	}
	$name configure -menu $tm
	return $name
}

proc create_type_combo {name current} {
	return [create_dropdown $name $current {All Procedure DME JCode Formulary}]
}