MulgraveTester
15 years agoFrequent Contributor
Detecting Read Only fields
My app has fields that cannot be edited but have the following properties
WndClass = Edit
Enabled = True
Visible = True
Exists = True
Focused = True
VisibleOnScreen = True
How do I detect that they cannot be edited?
If I try to do myField.setText("Some Text") then I get the error "Failed to enter text in the edit box, since it is read-only"
Somehow TC knows that the field is read-only but I cannot find a property of the field that I can use to identify this in code.
This field does not have a ReadOnly property. If I try
'VBScript
IF myField.ReadOnly then
log.message("Field is Read Only")
END IF
then I get the error "Unable to find the object ReadOnly."
Please tell me how to identify that the field is read-only.
WndClass = Edit
Enabled = True
Visible = True
Exists = True
Focused = True
VisibleOnScreen = True
How do I detect that they cannot be edited?
If I try to do myField.setText("Some Text") then I get the error "Failed to enter text in the edit box, since it is read-only"
Somehow TC knows that the field is read-only but I cannot find a property of the field that I can use to identify this in code.
This field does not have a ReadOnly property. If I try
'VBScript
IF myField.ReadOnly then
log.message("Field is Read Only")
END IF
then I get the error "Unable to find the object ReadOnly."
Please tell me how to identify that the field is read-only.