Edit Control

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 the Windows accessory NotePad, and ES_READONLY, which creates a read-only edit control.

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".

Supported Properties and Methods

  • accHitTest
    accLocation
    accNavigate
    accSelect
    get_accChild
    get_accChildCount
    get_accDescription
    get_accFocus
    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 "File name:" 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_accSelection
    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.

  • put_accValue

Events Generated

EVENT_OBJECT_VALUECHANGE

Remarks

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.

See Also

IAccessible Interface