Enabled When property

Use the Enabled When property to specify the conditions under which this component is enabled. If you reference variables, other components, or properties on collections on the form, WinStudio creates dependencies so that, when those values change, the condition is automatically executed.

To specify the enablement conditions, click the ellipsis (...) button next to the property.

For conditional expressions greater than 50 characters, the system creates a variable to hold the expression. In the Component properties sheet and Component List dialog box, the variable is displayed instead of the expression; in the Edit Set of Conditional Actions dialog box (mentioned below), the conditional expression is displayed.

注意: If you are using the Use Free Form option for a component, this field is disabled. If you want to set "enabled when" conditions, you must use the ENABLEDWHEN keyword in the Free Form, Data Type field.

Syntax

Use the Edit Set of Conditional Actions dialog box (displayed by the browse button) to build the appropriate expression.

Example

In the following example, the Description component is enabled only when the Name component on the primary collection contains a literal value of "WalkInCustomer":

Enabled:#C(Description),#C(Name) = "WalkInCustomer","True"
相关主题