![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
This section explains how to use a check box to set certain properties, such as visibility, enabled, and required for another control.Set the value of a visibility, enabled, or required flag for a given control at run-time based on the value of a checkbox control.To view the sample for this task, import the advanced sample projects as described in Import the Forms Advanced Samples. The sample form for the task described in this section is contained in the forms.samples.controls project.The form (VerticalBinding.form) is at the following location:To set up the visibility flag of a text control based on the checkbox control value, perform the following steps:
1.
2. Go to the General properties for the checkbox control.Create a binding for the Value attribute of the checkbox and set it to the Visible property of the text control. The direction of this binding is from the check box Value to the Visible property of the text control.
3. When you load the form, the check box is in cleared condition and Text Control1 is invisible. If you select the checkbox control, Text Control1 becomes visible in the form.To set up the enabled flag of a text control based on the checkbox control value, perform the following steps.
1.
2. Go to the General properties for the checkbox control.Create a binding for the Value attribute of the checkbox and set it to the Enable property of the text control. The direction of this binding is from the check box Value to the Enable property of the text control.
3. When you load the form, the check box is in cleared condition and Text Control2 is in a disabled state. If you select the checkbox control, Text Control2 is enabled on the form.To set up the required flag of a text control based on the checkbox control value, perform the following steps.
1.
2. Go to the General properties for the checkbox control.Create a binding for the Value attribute of the checkbox and set it to the Required property of the text control. The direction of this binding is from the check box Value to the Required property of the text control.
3. When you load the form, Text Control3 is marked as Not Required. If you select the checkbox control, Text Control3 is marked as Required on the form.
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |