ON DROPDOWN: Difference between revisions

From Macros Wiki
Jump to navigationJump to search
MikeO (talk | contribs)
No edit summary
MikeO (talk | contribs)
No edit summary
Line 8: Line 8:
|param3=<control to change>|param3_desc={{control to change}}
|param3=<control to change>|param3_desc={{control to change}}
|param4=<change>|param4_desc={{change}}
|param4=<change>|param4_desc={{change}}
}}
|description=Change the state of a dialog control, based on the current index of a dropdown menu.<br>
|param1=<dropdown number>|param1_desc={{dropdown number}}
|param2=<index>|param2_desc={{index}}
|param3=<control to change>|param2_desc={{control to change}}
|param4=<new state>|param3_desc=The state must be one of SHOW, HIDE, ENABLE or DISABLE.
}}
}}


===Example===
===Example===
:ON_DROPDOWN
: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.
[[Category:Dialog]]
[[Category:Dialog]]

Revision as of 18:52, 18 August 2010

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.