Click to return to the Reusing Browser Technology home page    
IHTMLInputElement::get_on...     IHTMLInputElement::get_re...     IHTMLInputElement Interfa...    
Web Workshop  |  Reusing Browser Technology

IHTMLInputElement::get_readOnly Method


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.


IHTMLInputElement::put_readOnly Method


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.



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.