Set a control for a UD field, as read only when line is closed

I added some UD fields to OrderDtl, and added a Sheet to the Order Entry form. The new sheet is a child of the “Lines” sheet.

I want the UD fields to be read only when the line id closed - like all the other built-in fields.

I could add code via a form event, to check the status of the Orderdtl.OpenLine, and set my controls accordingly. But it seems like there must be a more straightforward way.

Thanks in advance.