AddButton (PPGLayout) *

Introduced

4.0

Description

Adds a button to a layout. Unlike other controls a button doesn't have to be associated with any particular Parameter on the inspected object. Instead it basically serves the purpose of executing some script code when pressed.

By default, the width of the button is automatically determined based on the text of the Label. However this can be overridden with the siUICX attribute. (See PPGItem.SetAttribute)

Scripting Syntax

PPGLayout.AddButton( ScriptName, [Label] )

C# Syntax

PPGItem PPGLayout.AddButton( String in_ScriptName, String in_opt_Label );

Parameters

Parameter

Type

Description

ScriptName

String

A unique name for the button, which should not contain any space characters. This name is used to determine the logic subroutine to call when the button is pressed.

Label

String

Label of the button. If not specified then the ScriptName is displayed.

Return Value

PPGItem

See Also

PPGLayout.AddItem

PPGItem.Label

PPGItem.Name

PPG

PPGLayout.Logic

 

 

 

Examples

• See PPGLayout.AddButton.1.js

• See PPGLayout.AddButton.2.vbs

• See PPGLayout.AddButton.3.js



Autodesk Softimage 2011