[python] Creating a dialog pop-up with read-only text/string

I have created a dialog pop-up for confirming custom ComponentSettings to the test operator.
I would like to make the settings show as a read-only text instead of inside an editable field.
Currently, I just extract the settings with a custom string method and fill a field in the dialog pop-up with this string.

How can this be done?

Hi @jb111,

I wanted to say create a getter-only property like below, but that does not actually work:

    @property(String)
    @attribute(Browsable(True))
    def ReadOnlyString(self):
        return "Read-only string!"

I have created an issue for it here: string properties cannot be read-only · Issue #189 · opentap/OpenTap.Python · GitHub

Until that is fixed, there is a workaround involving the EnabledIf attribute:

    @property(String)
    @attribute(Browsable(True))
    @attribute(EnabledIf("IsReadOnly", True))
    def ReadOnlyString(self):
        return "Read-only string!"
    
    @property(Boolean)
    @attribute(Browsable(False))
    def StringIsReadOnly(self):
        return False

Thank you it worked!
I am looking forward to the “actual” property