UI Automation Text Attributes
This section contains information about the text attributes that are recognized in Microsoft UI Automation. These attributes are used in methods, such as IUIAutomationTextRange::GetAttributeValue and IUIAutomationTextRange::FindAttribute, and in the UI Automation provider equivalents.
In the following table, the attribute names are derived from the identifiers. For example, the AnimationStyle attribute is identified by clients as UIA_AnimationStyleAttributeId (defined in Uiautomationclient.h) and by providers as Text_AnimationStyle_Attribute_GUID (defined in Uiautomationcoreapi.h).
Attribute | Variant type | Data type | Notes |
---|---|---|---|
AnimationStyle | VT_I4 | AnimationStyle | |
BackgroundColor | VT_I4 | COLORREF | Background color in RGB format. COLORREF is a 32-bit value used to specify an RGB color. |
BulletStyle | VT_I4 | BulletStyle | |
CapStyle | VT_I4 | CapStyle | Capitalization style. |
Culture | VT_I4 | int (LCID) | Locale of the character by locale identifier, for example, 0x0409 for "en-US" or English (United States). When it is not specified, the locale should be same as the control or the application. |
FontName | VT_BSTR | BSTR | |
FontSize | VT_R8 | double | Point size. |
FontWeight | VT_I4 | int | This value is modeled after the lfWeight field in the GDI LOGFONT structure. For consistency, the following values have been adopted from LOGFONT:
0=DontCare 100=Thin 200=ExtraLight or UltraLight 300=Light 400=Normal or Regular 500=Medium 600=SemiBold or DemiBold 700=Bold 800=ExtraBold or UltraBold 900=Heavy or Black |
ForegroundColor | VT_I4 | COLORREF | |
HorizontalTextAlignment | VT_I4 | HorizontalTextAlignmentEnum | |
IndentationFirstLine | VT_R8 | double | First-line indentation, in measurement units. |
IndentationLeading | VT_R8 | double | Leading alignment, in measurement units. |
IndentationTrailing | VT_R8 | double | Trailing indentation, in measurement units. |
IsHidden | VT_BOOL | BOOL | |
IsItalic | VT_BOOL | BOOL | |
IsReadOnly | VT_BOOL | BOOL | |
IsSubscript | VT_BOOL | BOOL | |
IsSuperscript | VT_BOOL | BOOL | |
MarginBottom | VT_R8 | double | Bottom margin in points. |
MarginLeading | VT_R8 | double | Leading margin in points. |
MarginTop | VT_R8 | double | Top margin in points. |
MarginTrailing | VT_R8 | double | Trailing margin in points. |
OutlineStyles | VT_I4 | OutlineStyles | |
OverlineColor | VT_I4 | COLORREF | |
OverlineStyle | VT_I4 | TextDecorationLineStyleEnum | |
StrikethroughColor | VT_I4 | COLORREF | |
StrikethroughStyle | VT_I4 | TextDecorationLineStyleEnum | |
Tabs | VT_ARRAY|VT_R8 | SAFEARRAY of doubles | Array of tabs in points relative to the leading margin. |
TextFlowDirection | VT_I4 | FlowDirections | |
UnderlineColor | VT_I4 | COLORREF | |
UnderlineStyle | VT_I4 | TextDecorationLineStyleEnum |