Hi, 

Not sure whether that's the best solution or not, but your example seems to work on my side if I replace \starttable with \starttabulate and \stoptable with \stoptabulate as follows:

_________________________________________________________________

\startuseMPgraphic{recBox}{w,h,sx,sy,lColor}
  numeric u;    u := 1cm;
  draw unitsquare xyscaled (\MPvar{w}, \MPvar{h}) shifted (\MPvar{sx},\MPvar{sy}) withpen pencircle scaled 3pt withcolor \MPvar{lColor};
\stopuseMPgraphic
\defineoverlay
  [kBox]
  [\useMPgraphic{recBox}{w=2u,h=LineHeight+4pt, sx=.8u,sy=LineHeight-2pt,lColor=darkred}]

\starttext

\framed[frame=on,background=kBox]{
\starttabulate[|cw(.7cm)|cw(.7cm)|cw(1cm)|cw(1cm)|]
\HL
\NC  \NS[2][c] q          \NC\AR
\NC  p\NC    \NC 00 \NC 01\NC\AR
\HL
\NC 1 \NC 2   \NC 3 \NC 4\NC\AR
\NC 1 \NC 2   \NC 3 \NC 4\NC\AR
\NC 1 \NC 2   \NC 3 \NC 4\NC\AR
\NC 1 \NC 2   \NC 3 \NC 4\NC\AR
\NC 1 \NC 2   \NC 3 \NC 4\NC\AR
\HL
\stoptabulate
}
\stoptext
_________________________________________________________________

Best regards,
Florent


Le dim. 29 déc. 2024 à 00:04, Jeong Dal via ntg-context <ntg-context@ntg.nl> a écrit :
Sorry.
Here is a sample code.

Thank you.

Best regards,

Dalyoung




\startuseMPgraphic{recBox}{w,h,sx,sy,lColor}
numeric u; u := 1cm;
draw unitsquare xyscaled (\MPvar{w}, \MPvar{h}) shifted (\MPvar{sx},\MPvar{sy}) withpen pencircle scaled 3pt withcolor \MPvar{lColor};
\stopuseMPgraphic
\defineoverlay
[kBox]
[\useMPgraphic{recBox}{w=2u,h=LineHeight+4pt, sx=.8u,sy=LineHeight-2pt,lColor=darkred}]

\starttext

\framed[frame=on,background=kBox]{
\starttable[|cw(.7cm)|cw(.7cm)|cw(1cm)|cw(1cm)|]
\HL
\NC \NS[2][c] q \NC\AR
\NC p\NC \NC 00 \NC 01\NC\AR
\HL
\NC 1 \NC 2 \NC 3 \NC 4\NC\AR
\NC 1 \NC 2 \NC 3 \NC 4\NC\AR
\NC 1 \NC 2 \NC 3 \NC 4\NC\AR
\NC 1 \NC 2 \NC 3 \NC 4\NC\AR
\NC 1 \NC 2 \NC 3 \NC 4\NC\AR
\HL
\stoptable
}
\stoptext

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________