Retrieves the value that indicates whether the element's contents are read-only, meaning that the user cannot enter or edit text in the control.
Syntax
HRESULT get_readOnly( VARIANT_BOOL *p );
Parameters
- p
- Address of a VARIANT Boolean structure that receives VARIANT_TRUE if the element is read-only, or VARIANT_FALSE if not. The default value for this property is VARIANT_FALSE.
Return Value
Returns S_OK if successful, or an error code otherwise.
Remarks
This is different than disabled. Read-only still allows the element to receive the focus, while disabled does not.
Sets the value that indicates whether the element's contents are read-only, meaning that the user cannot enter or edit text in the control.
Syntax
HRESULT put_readOnly( VARIANT_BOOL v );
Parameters
- v
- VARIANT Boolean structure that specifies the value of the read-only flag. VARIANT_TRUE sets the element to read-only; VARIANT_FALSE does not. The default value for this property is VARIANT_FALSE.
Return Value
Returns S_OK if successful, or an error code otherwise.
Remarks
This is different than disabled. Read-only still allows the element to receive the focus, while disabled does not.