ToolStripItem.AccessibleRole 屬性

定義

取得或設定控制項的可存取角色,此角色可指定控制項的使用者介面項目之類型。Gets or sets the accessible role of the control, which specifies the type of user interface element of the control.

public:
 property System::Windows::Forms::AccessibleRole AccessibleRole { System::Windows::Forms::AccessibleRole get(); void set(System::Windows::Forms::AccessibleRole value); };
public System.Windows.Forms.AccessibleRole AccessibleRole { get; set; }
member this.AccessibleRole : System.Windows.Forms.AccessibleRole with get, set
Public Property AccessibleRole As AccessibleRole

屬性值

其中一個 AccessibleRole 值。One of the AccessibleRole values. 預設值為 PushButtonThe default is PushButton.

例外狀況

所指派的值不是其中一個 AccessibleRole 值。The value assigned is not one of the AccessibleRole values.

備註

AccessibleRole 屬性會描述物件是何種使用者介面項目。The AccessibleRole property describes what kind of user interface element an object is. 如果無法判斷控制項的角色,AccessibleRole 屬性會設定為 AccessibleRole.PushButtonIf the control's role cannot be determined, the AccessibleRole property is set to AccessibleRole.PushButton.

如需可存取物件屬性的詳細資訊,請參閱描述性屬性的內容For more information about properties of accessible objects, see Content of Descriptive Properties.

如需範例,請參閱 AccessibleObject 類別。For samples, see the AccessibleObject class.

適用於

另請參閱