Edit Control (MSAA UI Element Reference)
This topic describes Edit Control objects for purposes of MSAA UI Element Reference. How to create Edit Control objects in various UI frameworks is not described here. See the API reference documentation for the UI framework you're using.
Edit controls let a user view and edit text. Edit controls are created with many different styles such as ES_MULTILINE. This style creates a multiline edit control, such as the client area of Notepad, and ES_READONLY, which creates a read-only edit control.
Microsoft Active Accessibility does not make a distinction between edit controls created with the window class name "EDIT" and rich edit controls created with the window class name "RichEdit" or "RichEdit20A".
Edit controls support the following IAccessible methods:
Edit controls support the following IAccessible properties:
|get_accKeyboardShortcut||The KeyboardShortcut property is the edit control's access key, which is an underlined character in the text of the edit control's label. For example, on a standard File Open dialog box such as in WordPad, the KeyboardShortcut for the edit control labeled "Filename:" is "Alt+n".|
|get_accName||The Name property is the text from a static text control that labels the edit control. For example, on a standard File Open dialog box such as in WordPad, the Name property for the edit control is "File name:".|
|get_accParent||The Parent property is a window ( ROLE_SYSTEM_WINDOW ) that surrounds the control and has the same Name property and window class name as the control.|
|get_accRole||The Role property is ROLE_SYSTEM_TEXT.|
|get_accState||The State property is a combination of one or more of the following values:STATE_SYSTEM_INVISIBLE | STATE_SYSTEM_FOCUSABLE | STATE_SYSTEM_FOCUSED | STATE_SYSTEM_READONLY | STATE_SYSTEM_PROTECTED | STATE_SYSTEM_NORMAL
|get_accValue||The Value property is a single string that contains the text in the edit control. However, if the control is password protected, the Value property returns E_ACCESSDENIED. For multiline edit controls, the string contains a carriage return and a newline character at the end of each line.|
Microsoft Active Accessibility does not support the selection of the text contained in edit and rich edit controls because the text is exposed as a string in the object's Value property.
The rich edit control provided by Riched20.dll (which is used in text editors such as WordPad in Windows 98) does not send any WinEvents when the caret position is changed during text selection. When users press SHIFT and arrow keys to select text, the caret object does not trigger the EVENT_OBJECT_LOCATIONCHANGE WinEvent. When the selection is set programmatically through rich edit messages, the caret object does not send any events to indicate its new position.
All applications that use Riched20.dll exhibit this problem. Applications using earlier versions of the rich edit control correctly send events based on the selection.
The State value for password edit controls always includes the bit flag STATE_SYSTEM_PROTECTED.