garry -
in TCL, variables aren't interpolated inside braces, so the $allowed in your set widget statement is taken literally instead of as a variable reference. you need to enclose the content of your set widget statement in "" quotes (which also means you'll need to \" escape all the quotes within the string).