ON DROPDOWN

From Macros Wiki
Revision as of 18:52, 18 August 2010 by MikeO (talk | contribs)
Jump to navigationJump to search

Up

Command

ON_DROPDOWN <dropdown number>, <index>, <control to change>, <new state>


xxx

Parameters

<dropdown number>
Define the group number of the radio button, for example:
dropdown_new 1, 15, 52, 110, 24, drop1
dropdown_add 1, "Simple Shapes", 10
dropdown_add 1, "Advanced Shapes", 20
<index>
Template:Index
<control to change>
Name of the control to change the state of.
<change>
Template:Change

|description=Change the state of a dialog control, based on the current index of a dropdown menu.

|param1=<dropdown number>|param1_desc=Define the group number of the radio button, for example:

dropdown_new 1, 15, 52, 110, 24, drop1
dropdown_add 1, "Simple Shapes", 10
dropdown_add 1, "Advanced Shapes", 20

|param2=<index>|param2_desc=Template:Index |param3=<control to change>|param2_desc=Name of the control to change the state of. |param4=<new state>|param3_desc=The state must be one of SHOW, HIDE, ENABLE or DISABLE. }}

Example

ON_DROPDOWN 2, 5, INPUT4, DISABLE
This will enable the 4th input box when the 5th item on the 2nd dropdown menu is selected.
The opposite also applies, the input box will be disabled when any other item on the dropdown is selected.