VS:vsoAppendWidget

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

Adds a parameter to the Object info palette.

WidgetTypes:

	kFieldLongInt     = 1;
	kFieldBoolean     = 2;
	kFieldReal        = 3;
	kFieldText        = 4;
	kFieldCalculation = 5;
	kFieldHandle      = 6;
	kFieldCoordDisp   = 7; {dimension}
	kFieldPopUp       = 8;
	kFieldRadio       = 9;
	kFieldCoordLocX   = 10;	
	kFieldCoordLocY   = 11;

	kWidgetButton     = 12;
	kWidgetStaticText = 13;
	kWidgetDisclosure = 14; {not implemented?}

See VS:Object Events.

FUNCTION vsoAppendWidget(
widgetType :LONGINT;
mappingID :LONGINT;
text :STRING;
data :LONGINT) :BOOLEAN;
def vs.vsoAppendWidget(widgetType, mappingID, text, data):
    return BOOLEAN

Parameters

widgetType LONGINT
mappingID LONGINT
text STRING
data LONGINT

Remarks

This call should be used when a widget is to be added that does not have a corresponding parameter in the object's parameter list (i.e., buttons or static text).

mappingID: a unique number which will be supplied to GetEventInfo to identify which button was pressed.

text: the widget label. data: not implemented at this time.

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;

Python


Version

Availability: from All Versions

This is drop-in function.