UI Automation Support for the Edit Control Type
This topic provides information about UI Automation support for the Edit control type. In UI Automation, a control type is a set of conditions that a control must meet in order to use the ControlTypeProperty property. The conditions include specific guidelines for UI Automation tree structure, UI Automation property values, and control patterns.
Edit controls are an example of controls that implement the Edit control type. Edit controls allow a user to view and edit a single line of text.
The following sections define the required UI Automation tree structure, properties, control patterns, and events for the Button control type. The UI Automation requirements apply to all button controls, whether Windows Presentation Foundation (WPF), Win32, or Windows Forms.
This topic contains the following sections.
- Required UI Automation Tree Structure
- Required UI Automation Properties
- Required UI Automation Control Patterns
- Required UI Automation Events
- Related Topics
Required UI Automation Tree Structure
The following table depicts the control view and the content view of the UI Automation tree that pertains to edit controls and describes what can be contained in each view. For more information about the UI Automation tree, see UI Automation Tree Overview.
Control View | Content View |
---|---|
|
|
The controls that implement the Edit control type will always have zero scroll bars in the control view of the UI Automation tree because it is a single-line control. The single line of text may wrap in some layout scenarios. The Edit control type is only meant for small amounts of editable text.
Required UI Automation Properties
The following table lists the UI Automation properties whose value or definition is especially relevant to edit controls. For more information about UI Automation properties, see UI Automation Properties for Clients.
UI Automation Property | Value | Notes |
---|---|---|
See notes. |
The value of this property needs to be unique across all controls in an application. |
|
See notes. |
The outermost rectangle that contains the whole control. |
|
See notes. |
The edit control must have a clickable point that gives input focus to the edit portion of the control when a user clicks the mouse there. |
|
See notes. |
If the control can receive keyboard focus, it must support this property. |
|
See notes. |
The name of the edit control is typically generated from a static text label. If there is not a static text label, a property value for |
|
See notes. |
If there is a static text label associated with the control, then this property must expose a reference to that control. If the text control is a subcomponent of another control, it will not have a |
|
Edit |
This value is the same for all UI frameworks. |
|
"edit" |
Localized string corresponding to the Edit control type. |
|
True |
The edit control is always included in the content view of the UI Automation tree. |
|
True |
The edit control is always included in the control view of the UI Automation tree. |
|
See notes. |
Must be set to true on edit controls that contain passwords. If an edit control does contain Password contents then this property can be used by a screen reader to determine whether keystrokes should be read out as the user types them. |
Required UI Automation Control Patterns
The following table lists the control patterns required to be supported by all edit controls. For more information about control patterns, see UI Automation Control Patterns Overview.
Control Pattern/Control Pattern Property | Support/Value | Notes |
---|---|---|
Required |
All edit controls must support the Text control pattern because detailed information must always be available for assistive technology clients. |
|
Depends |
All edit controls that take a string must expose the Value pattern. |
|
See notes. |
This property must be set to indicate whether the control can have a value set programmatically. |
|
See notes. |
This property will return the textual contents of the edit control. If the |
|
Depends |
All edit controls that take a numeric range must expose Range Value control pattern. |
|
See notes. |
This property must be the smallest value that the edit control's contents can be set to. |
|
See notes. |
This property must be the largest value that the edit control's contents can be set to. |
|
See notes. |
This property must indicate the number of decimal places that the value can be set to. If the edit only take integers, the |
|
Null |
This property does not need to be exposed on an edit control. |
|
See notes. |
This property will indicate the numeric contents of the edit control. When a more precise value is set by a UI Automation client within the ranges specified in the |
Required UI Automation Events
The following table lists the UI Automation events required to be supported by all edit controls. For more information about events, see UI Automation Events Overview.
UI Automation Event | Support | Notes |
---|---|---|
Required |
None |
|
Required |
None |
|
Required |
None |
|
BoundingRectangleProperty property-changed event. |
Required |
None |
IsOffscreenProperty property-changed event. |
Required |
None |
IsEnabledProperty property-changed event. |
Required |
None |
NameProperty property-changed event. |
Required |
None |
ValueProperty property-changed event. |
Depends |
None |
HorizontallyScrollableProperty property-changed event. |
Never |
None |
HorizontalScrollPercentProperty property-changed event. |
Never |
None |
HorizontalViewSizeProperty property-changed event. |
Never |
None |
VerticalScrollPercentProperty property-changed event. |
Never |
None |
System.Windows.Automation.ScrollPatternIdentifiers.VerticallyScrollableProperty property-changed event. |
Never |
None |
VerticalViewSizeProperty property-changed event. |
Never |
None |
ValueProperty property-changed event. |
Depends |
If the control supports the range Value control pattern, it must support this event. |
Required |
None |
|
Required |
None |