Posted to tcl by jeremy_c at Thu Sep 13 23:21:34 GMT 2007view pretty

dbcombo instproc init args {
	global db
	
	my set path [string trimleft [self] ":"]
	set path [my path]
	set sql  [my sql]
	set idvariable [my idvariable]
	
	ttk::menubutton [my path] -width [my width]
	menu $path.menu
	pg_select $db $sql result {
		$path.menu add command -label $result(label)
	}
	$path configure -menu $path.menu
	
	upvar #0 $idvariable idvar
	trace add variable idvar write [list [my] showChange]
}