Difference between revisions of "ON EVENT"
From Macros Wiki
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
[[:Category:Dialog|{{Up}}]] | [[:Category:Dialog|{{Up}}]] | ||
− | {{Command|syntax=ON_EVENT <control to check>, <control to change>, < | + | {{Command|syntax=ON_EVENT <control to check>, <control to change>, <new state> |
− | |description= | + | |description=:Change the state of a dialog control, based on the current state of another control.<br> |
+ | :For example, disable an input box when a checkbox is unchecked. | ||
|param1=<control to check>|param1_desc={{control to check}} | |param1=<control to check>|param1_desc={{control to check}} | ||
|param2=<control to change>|param2_desc={{control to change}} | |param2=<control to change>|param2_desc={{control to change}} | ||
− | |param3=< | + | |param3=<new state>|param3_desc=The state must be one of SHOW, HIDE, ENABLE or DISABLE. |
}} | }} | ||
===Example=== | ===Example=== | ||
− | :ON_EVENT | + | :ON_EVENT CHECK3, INPUT4, DISABLE |
+ | <br> | ||
+ | :This will enable the 4th input box when the third checkbox is checked. | ||
+ | :The opposite also applies, the input box will be disabled when it is unchecked. | ||
[[Category:Dialog]] | [[Category:Dialog]] |
Latest revision as of 10:21, 17 January 2011
Command
- ON_EVENT <control to check>, <control to change>, <new state>
- Change the state of a dialog control, based on the current state of another control.
- For example, disable an input box when a checkbox is unchecked.
Parameters
- <control to check>
- The name of the {CONTROL} to check.
- <control to change>
- Name of the control to change the state of.
- <new state>
- The state must be one of SHOW, HIDE, ENABLE or DISABLE.
Example
- ON_EVENT CHECK3, INPUT4, DISABLE
- This will enable the 4th input box when the third checkbox is checked.
- The opposite also applies, the input box will be disabled when it is unchecked.