AccessibleObject.Value 屬性


取得或設定可存取物件的數值。Gets or sets the value of an accessible object.

 virtual property System::String ^ Value { System::String ^ get(); void set(System::String ^ value); };
public virtual string Value { get; set; }
member this.Value : string with get, set
Public Overridable Property Value As String



可存取物件的值,或者,如果未設定物件值,則為 nullThe value of an accessible object, or null if the object has no value set.


無法設定或擷取數值。The value cannot be set or retrieved.


一般來說,Value 屬性代表物件所包含的視覺化資訊。Typically, the Value property represents visual information contained by the object. 並非所有物件都支援 Value 屬性。Not all objects support the Value property.

在大部分的情況下,Value 屬性會用來告知用戶端物件所包含的視覺資訊。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.

Value 屬性可以在樹狀檢視控制項之類的案例中提供階層式資訊。The Value property can provide hierarchical information in cases such as a tree view control. 雖然樹狀檢視控制項中的父物件不會在 Value 屬性中提供資訊,但控制項中的每個專案都有以零為起始的值,代表其在階層中的層級。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. 最上層專案的值為零,第二層專案的值為1,依此類推。Top-level items have a value of zero, second-level items have a value of one, and so on.


從捲軸和資料列可存取物件傳回的值表示百分比,因此它們是介於0到100(含)之間的整數。The values returned from scroll bar and trackbar accessible objects indicate percentages, so they are integers between 0 and 100, inclusive.