dxUIACalculateAllProperties Variable
Specify if all properties are automatically calculated for a node in the UI Automation tree.
Declaration
var dxUIACalculateAllProperties: Boolean = True;
Variable Value
Type | Description |
---|---|
Boolean |
|
Remarks
You can set the dxUIACalculateAllProperties
global variable to False
if you need to disable automatic property calculation for UIA nodes associated with all supported DevExpress controls in an application.
Calculate Only UIA Node Names for Editors
The code example in this section demonstrates an OnInitializeProperties event handler that disables automatic calculation for UIA node properties and enables calculation only for the Name UIA property. The form’s OnCreate event handler assigns the same OnInitializeProperties event handler to TcxTextEdit, TcxButtonEdit, and TcxCheckBox editors.
uses
dxUIAClasses, // Declares all UI Automation classes
cxEdit, // Declares base editor classes and auxiliary types
cxTextEdit, // Declares the TcxTextEdit class
cxCheckBox, // Declares the TcxCheckBox class
cxButtonEdit; // Declares the TcxButtonEdit class
// ...
procedure TMyForm.InitializeAutomationProperties(
ASender: TObject; AProperties: TdxAutomationProperties);
begin
if dxUIACalculateAllProperties then
dxUIACalculateAllProperties := False; // Disables automatic UIA node property calculation
AProperties.Name.Calculated := True; // Enables calculation for the initialized Name UIA property
end;
procedure TMyForm.FormCreate(Sender: TObject);
begin
cxTextEdit1.Properties.Automation.OnInitializeProperties := InitializeAutomationProperties;
cxCheckBox1.Properties.Automation.OnInitializeProperties := InitializeAutomationProperties;
cxButtonEdit1.Properties.Automation.OnInitializeProperties := InitializeAutomationProperties;
end;