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 allow the element to receive the focus.
Windows CE
Windows CE Use version 2.12 and later Minimum availability Internet Explorer 4.0
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 a read-only flag to set. 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 allow the element to receive the focus.
Windows CE
Windows CE Use version 2.12 and later Minimum availability Internet Explorer 4.0