% interface=en output=pdftex
\setupcolors[state=start]
\setupinteraction[state=start]

\starttext

\showmakeup


\def\Buttonheight{8mm}
\def\Buttonwidth{40mm}

\def\ButtonUnselected#1{\framed[frame=off,strut=no,offset=overlay,align={right,lohi},
  width=\Buttonwidth,height=\Buttonheight]
  {\xii#1}}
\def\ButtonSelected#1{\framed[strut=no,offset=overlay,width=\Buttonwidth,height=\Buttonheight,
  align={right,lohi},background=color,backgroundcolor=lightgray,frame=on]
  {\xii#1}}


\definesymbol[TbuttonA] [{\ButtonUnselected{Normal}}]
\definesymbol[TbuttonB] [{\ButtonSelected{InArea}}]
\definesymbol[TbuttonC] [{\ButtonSelected{LMbutton}}]

\definesymbol[TbuttonX] [{\ButtonUnselected{NormalX}}]
\definesymbol[TbuttonY] [{\ButtonSelected{InAreaX}}]
\definesymbol[TbuttonZ] [{\ButtonSelected{LMbuttonX}}]


\setupfield[button]
  [width=40mm,
   height=8mm,
   align=right,
   distance=0mm,
   fieldoffset=0bp,
   offset=none,
   strut=no,
   depth=0pt,
   frame=off,
   leftframe=on,
   rightframe=on,
  ]

\setupfield[radiofield][vertical] % same for horizontal+\hbox
  [align=right,
   distance=0mm,
   offset=none,
   strut=no,
   fieldoffset=0mm,
   frame=on,
   empty=yes,
   option=empty,
  ]

\definefield[Radio1][radio][radiofield][Button1,Button2,Button3][Button1]

\definesubfield[Button1] [button] [{TbuttonA,TbuttonB,TbuttonC},{TbuttonX,TbuttonY,TbuttonZ}]
\definesubfield[Button2] [button] [{TbuttonA,TbuttonB,TbuttonC},{TbuttonX,TbuttonY,TbuttonZ}]
\definesubfield[Button3] [button] [{TbuttonA,TbuttonB,TbuttonC},{TbuttonX,TbuttonY,TbuttonZ}]


\noindent
\vbox{%
\field[Button1]
\field[Button2]
\field[Button3]
}

\stoptext
