VS:ItemSel

From Vectorworks Developer
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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

Description

Function ItemSel returns TRUE if the specified checkbox or radio button is selected. This procedure is used to return the status of check boxes or radio buttons when exiting a custom dialog.

FUNCTION ItemSel(
fieldID :INTEGER) : BOOLEAN;
def vs.ItemSel(fieldID):
    return BOOLEAN

Parameters

fieldID INTEGER Item ID of dialog control whose state will be returned.

Remarks

Note: deprecated from VW 15+, use GetBooleanItem.

The example is somewhat incomplete. If you're going to show ItemSel in the context of a dialog event loop, show all of the code for the loop.

When using modern dialogs, calling ItemSel after the dialog has been dismissed crashes VW.

Example

VectorScript

REPEAT
DialogEvent(Item);

CASE Item OF
{// OK Button //}
1:BEGIN
Done:=TRUE;
targetValue	:= GetField(4);
replaceValue:= GetField(6);

IF ItemSel(9) THEN textMode:=2;
IF ItemSel(10) THEN textMode:=4;
IF ItemSel(11) THEN textMode:=6;

Python


Version

Availability: from All Versions. Deprecated from VW 15+.