Value Property

AccessibleObject.Value Property

Gets or sets the value of an accessible object.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

public virtual string Value { get; set; }
/** @property */
public String get_Value ()

/** @property */
public void set_Value (String value)

public function get Value () : String

public function set Value (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.

Exception typeCondition

COMException

The value cannot be set or retrieved.

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.

NoteNote

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

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2016 Microsoft