如何访问控件?

How to access controls?

我刚刚创建了一个 window,其中包含一个填写字段 (TestField) 和一个复选框 (chk_TestField):

DEFINE VARIABLE TestField AS INTEGER VIEW-AS FILL-IN.
DEFINE VARIABLE chk_TestField AS LOGICAL VIEW_AS TOGGLE-BOX.

更改填充字段的值非常简单,基于复选框的检查,例如:

ON VALUE-CHANGED OF chk_TestField IN FRAME DEFAULT-FRAME
DO:
  TestField = 5.
END.

但是,我对更改填写字段本身的属性感兴趣,而不是它代表的整数(我想将填写字段设置为只读),我该怎么做?

我试过:

ON VALUE-CHANGED OF chk_TestField IN FRAME DEFAULT-FRAME
DO:
  TestField.Read-Only = NOT(chk_TestField).
END.

这显然行不通。

ASSIGN TestField:READ-ONLY IN FRAME {&FRAME-NAME} = TRUE.

ASSIGN Table.TestField:READ-ONLY IN FRAME {&FRAME-NAME} = TRUE.