Static text controls provide a convenient way to display text on dialog boxes and other windows. Static text controls often serve as labels for other controls.
The window class name for a static text control is "STATIC".
Supported Properties and Methods
- The ChildCount property is zero.
- The KeyboardShortcut property is the access key, which is the underlined character in the text that activates the control associated with the static text. The returned string contains the access key character appended to the string "Alt+".
- The Name property is the same as the text in the static text control.
- 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.
- The Role property is ROLE_SYSTEM_STATICTEXT.
- The State property is a combination of one or more of the following values:
STATE_SYSTEM_READONLY | STATE_SYSTEM_INVISIBLE
The accSelect method returns DISP_E_MEMBERNOTFOUND when it is called with SELFLAG_TAKEFOCUS on a static text object.
Static controls with the SS_ICON style return invalid data in the Name property.