This documentation is archived and is not being maintained.

AccessibleObject.Value Property

Gets or sets the value of an accessible object.

[Visual Basic]
Public Overridable Property Value As String
[C#]
public virtual string Value {get; set;}
[C++]
public: __property virtual String* get_Value();
public: __property virtual void set_Value(String*);
[JScript]
public function get Value() : String;
public function set Value(String);

Property Value

The value of an accessible object, or a null reference (Nothing in Visual Basic) if the object has no value set.

Exceptions

Exception Type Condition
COMException The value cannot be set or retrieved.

Remarks

Typically, the Value property represents visual information contained by the object. Not all objects support the Value property.

In most cases, the Value property is used to tell the client about what visual information an object contains. For example, the value for an edit control is the text it contains, but a menu item has no value.

The Value property can provide hierarchical information in cases such as a tree view control. Although the parent object in the tree view control does not provide information in the Value property, each item within the control has a zero-based value that represents its level within the hierarchy. Top-level items have a value of zero, second-level items have a value of one, and so on.

Note   The values returned from scroll bar and trackbar accessible objects indicate percentages, so they are integers between 0 and 100, inclusive.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

AccessibleObject Class | AccessibleObject Members | System.Windows.Forms Namespace | Bounds | DefaultAction | Description | Help | KeyboardShortcut | Name | Parent | Role | State

Show: