Skip to main content
All docs
V25.1
  • TdxStringAutomationProperty Class

    Stores a string property for a UI Automation tree node.

    Declaration

    TdxStringAutomationProperty = class(
        TdxAutomationProperty<string>
    )

    Remarks

    The TdxStringAutomationProperty class instantiates its ancestor (TdxAutomationProperty with the string type (UnicodeString in C++Builder).

    Main API Members

    The list below outlines key members of the TdxStringAutomationProperty class. These members allow you to manage an individual UIA node property.

    Calculated
    Specifies if the UIA node property is calculated.
    Clear
    Resets the UIA node property.
    IsNull
    Identifies if the UIA node property is specified.
    Value
    Specifies the UIA node property value.

    Code Examples

    Indicate Read-Only and Editable States

    The code example in this section changes the description of an unbound single-line text editor (TcxTextEdit) in the UI Automation tree when the editor switches between read-only and editable states.

    uses
      dxUIAClasses,  // Declares all UI Automation classes
      cxEdit,  // Declares base editor classes and auxiliary types
      cxTextEdit;  // Declares the TcxTextEdit class
    // ...
    
    procedure TMyForm.cxTextEdit1PropertiesAutomationCalculateProperty(
      ASender: TObject; AProperty: TdxAutomationProperty;
      AProperties: TdxAutomationProperties);
    var
      AEdit: TcxTextEdit;
    begin
      AEdit := ASender as TcxTextEdit;
      // Check if the UIA node description property is requested
      if AProperty = AProperties.FullDescription then
      begin
        if AEdit.Properties.ReadOnly then
          AProperties.FullDescription.Value := 'Read-Only Mode'
        else
          AProperties.FullDescription.Value := 'Editable';
      end;
    end;
    

    Initialize UIA Node Names for Editors

    The following code example initializes Name and FullDescription UIA node names for an existing single-line text editor (TcxTextEdit):

    uses
      dxUIAClasses,  // Declares all UI Automation classes
      cxEdit,  // Declares base editor classes and auxiliary types
      cxTextEdit;  // Declares the TcxTextEdit class
    // ...
    
    procedure TMyForm.cxTextEdit1PropertiesAutomationCalculateProperty(
      ASender: TObject; AProperties: TdxAutomationProperties);
    begin
      AProperties.Name.Value := 'Task Description';
      AProperties.FullDescription.Value := 'Non-Editable';
    end;
    

    Direct TdxStringAutomationProperty Class References

    The following public API members reference a TdxStringAutomationProperty object:

    TdxAutomationProperties.FullDescription
    Stores a UIA tree node’s full description.
    TdxAutomationProperties.Name
    Stores a UIA tree node name.

    Inheritance

    See Also