Class

DuButton

DuButton()

For use with DuScriptUI.
An Image Button.
This is not a real class, and cannot be instanciated.
Use DuScriptUI.button to create an Image Button.
The Image Button inherits the Group object from ScriptUI and has all of its properties and methods.
Constructor

# new DuButton()

Properties:
Name Type Description
helpLink string A URL to a help page, shown on shift click on the button.
image Image The scriptui object representing the image.
label StaticText The label
optionsPopup DuPopup A popup for .
optionsPanel Group The ScriptUI Group where to add the options (child of the popup).
onClick DuButton~onClick The function to execute when the button is clicked
onAltClick DuButton~onAltClick The function to execute when the button is Alt + clicked
onCtrlClick DuButton~onCtrlClick The function to execute when the button is Ctrl + clicked
onCtrlAltClick DuButton~onCtrlAltClick The function to execute when the button is Ctrl + Alt + clicked
onOptions DuButton~onOptions The function to execute when the options are called (Shift+CLick or click on the options button)

View Source DuAEF.jsxinc, line 11424

Methods

# static setBackgroundColor(color)

Changes the background color of the button.
Parameters:
Name Type Description
color DuColor the color.

View Source DuAEF.jsxinc, line 11477

# static setHelpTip(helptip)

Changes the helptip of the button.
Parameters:
Name Type Description
helptip string the helptip.

View Source DuAEF.jsxinc, line 11501

# static setImage(image)

Changes the image of the button.
Parameters:
Name Type Description
image File | DuBInary the image. Changing the image does not work with PNG as strings, a File must be passed.

View Source DuAEF.jsxinc, line 11493

# static setText(text)

Changes the text of the button.
Parameters:
Name Type Description
text string the text.

View Source DuAEF.jsxinc, line 11509

# static setTextColor(color)

Changes the text color of the button.
Parameters:
Name Type Description
color DuColor the color.

View Source DuAEF.jsxinc, line 11485

Type Definitions

# onAltClick()

The function to execute when the button is Alt + clicked.

View Source DuAEF.jsxinc, line 11451

# onClick()

The function to execute when the button is clicked.

View Source DuAEF.jsxinc, line 11445

# onCtrlAltClick()

The function to execute when the button is Ctrl + Alt + clicked.

View Source DuAEF.jsxinc, line 11463

# onCtrlClick()

The function to execute when the button is Ctrl + clicked.

View Source DuAEF.jsxinc, line 11457

# onOptions(showUI)

The function to execute when the options are called (Shift+CLick or click on the options button).
Use the showUI parameter to build the options when the button is clicked without showing any UI.
Parameters:
Name Type Description
showUI Boolean This is set to false when the button is clicked: use this parameter to build the options without showing any UI when needed on all button clicks.

View Source DuAEF.jsxinc, line 11469