- Form Designers
Control properties can now be changed at Runtime. The Control Properties section has been added to the Actions of the Rule Designer to provide the flexibility to change the properties of a control when an Event has executed.
Configuring the control properties in the Properties panel of the Layout step - Configuration is done in Design Time and applied in Runtime before any Rules are executed.
Using a Control Properties Action in the Rule Designer - Configuration is done in Design Time and applied in Runtime as part of a Rule execution.
The following Control Properties Actions are available in the Rule Designer in the Control Interaction section:
For detailed information, see the Control Properties Actions topic in the help file:
K2 Designer>Understanding Rules>Actions>Control Properties Actions
We will use a View with a Picture control to show how the control size can be changed at runtime.
Follow the steps below to set up the scenario as described above:
- Create a View with a Picture control and a Button control.
- Select a picture in the Data Source section of the control properties.
- Go to the Rules section and add the following Rule:
Events: When a control on the View raises an event
Actions: Set a control's properties
- Configure the Set a control’s properties Action as follows:
- Finish the Rule and the View.
- Run the View. Note the size of the Picture control.
- Click on the Button control. The picture is resized according to the control properties specified in the Rule.