Most probably a typo error in your layout proc()
proc layout() =
panel.autolayout """
H:|{groupButton:[btnClick(btnClose)]-[btnClose]}|
H:|{groupText:[-50-[text]]}|
V:|[label]-[groupText]-[groupButton]|
H:|[label, groupText]|
RunThis template works, at least no error after compilation. By the way not sure it is the layout you want.
