VS:vsoAppendParamWidget

From Vectorworks Developer
Jump to: navigation, search

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

Description

Appends a widget into the OI palette.

See the <a href=http://www.vectorlab.info/index.php?title=Events>VectorLab article</a> on object events.

FUNCTION vsoAppendParamWidget(
parameterID  :LONGINT;
text  :STRING;
data  :LONGINT) :BOOLEAN;
def vs.vsoAppendParamWidget(parameterID, text, data):
    return BOOLEAN

Parameters

parameterID LONGINT
text STRING
data LONGINT

Remarks

This function adds a parameter widget to the end of OIP.

The parameterID corresponds to the ordinal value of the parameter in the object's parameter list.

The text parameter is the label of the parameter to be displayed on the OIP.

The data parameter is currently not in use.

Example

VectorScript

kOnInitPropertiesEventID: 
BEGIN
   resultStatus := SetObjPropVS(kObjectHasUIOverrideID, TRUE);
   resultStatus := vsoAppendParamWidget(1, 'Unused number', 0);
   resultStatus := vsoAppendParamWidget(2, 'Static Text Widget', 0);
   resultStatus := vsoAppendParamWidget(3, 'Enter junk here', 0);
   resultStatus := vsoAppendParamWidget(4, 'Previous static text', 0);
   resultStatus := vsoAppendWidget(kWidgetButton, 1, 'Update Text', 0);
END;


**NOTE: FOR localizations purposes this call should be used IN combination 
WITH the GetLocalizedPluginParameter FUNCTION as shown below.

IF GetLocalizedPluginParameter('NewModelWindowMain','TopShape',temp_s) THEN
BEGIN
   result := vsoAppendParamWidget(1,temp_s,eventData);
END;

Python


Version

Availability: from All Versions

This is drop-in function.

Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox