VS:GetPopUpChoiceIndex

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

Gets the zero based index of the first choice in the pop-up which has itemText name. If there is no choice named itemText in the pop-up itemIndex is set to -1.

PROCEDURE GetPopUpChoiceIndex(
dialogID :LONGINT;
componentID :LONGINT;
itemText :STRING;
VAR itemIndex :INTEGER);
def vs.GetPopUpChoiceIndex(dialogID, componentID, itemText):
    return itemIndex

Parameters

dialogID LONGINT the dialog identifier given by CreateLayout or CreateResizableLayout
componentID LONGINT The identifier of the component which choice index will be retrieved from by a given choice name.
itemText STRING The name of the choice which index will be obtained.
itemIndex INTEGER The index of the given choice's string in the pop-up. If there are duplicate choice name itemIndex is the index of the first choice having itemText name.

Version

Availability: from Vectorworks 2011