[Stackoverflow]

Discussão em 'StackOverflow' iniciado por fdantas, Janeiro 8, 2021.

  1. fdantas

    fdantas Administrator Moderador

    I have just created a window, containing a fill-in field (TestField) and a checkbox (chk_TestField):

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


    It is very simple to change the value of the fill-in field, based on the checking of the checkbox, something like:

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


    However, I'm interested in changing an attribute of the Fill-in field itself, not the integer it represents (I would like to make the fill-in field read-only), how to I do this?

    I've tried:

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


    This, obviously, does not work.

    Continue reading...

Compartilhe esta Página