VS:SetItemEnable

From Vectorworks Developer
Jump to: navigation, search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Procedure SetItemEnable sets the enable state of a custom dialog item. When an item is enabled, it is available as a valid choice in the dialog; when disabled, an item is grayed and cannot be chosen by the user. SetItemEnable supports all custom dialog controls in VectorScript.

Enable States of Dialog Items

Enable States of Dialog Items

PROCEDURE SetItemEnable(
item  :INTEGER;
enable  :BOOLEAN);
def vs.SetItemEnable(item, enable):
    return None

Parameters

item INTEGER Item ID of dialog control whose enable state will be modified.
enable BOOLEAN New enable state of dialog control.

Remarks

Note: deprecated from VW 15+, use EnableItem

Sets the enable state of a dialog item. When you disable an item it is drawn in gray and cannot be chosen by the user.

Mac only bug: If your dialog Item 1 is set to be disabled the enter and return keys on the mac still generate a valid dialog event for Item 1.

Example

VectorScript

InsertChoice(10,1,'All Classes');
InsertChoice(10,2,'Visible Classes');
SetItemEnable(11,TRUE);
SetItemEnable(12,FALSE);
SetItemEnable(13,FALSE);
SetItemEnable(14,FALSE);

Python


Version

Availability: from VectorWorks 8.0. Deprecated from VW 15+.
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox