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 DuESF.jsxinc, line 10601

Methods

# static setBackgroundColor(color)

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

View Source DuESF.jsxinc, line 10654

# static setHelpTip(helptip)

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

View Source DuESF.jsxinc, line 10678

# 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 DuESF.jsxinc, line 10670

# static setText(text)

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

View Source DuESF.jsxinc, line 10686

# static setTextColor(color)

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

View Source DuESF.jsxinc, line 10662

Type Definitions

# onAltClick()

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

View Source DuESF.jsxinc, line 10628

# onClick()

The function to execute when the button is clicked.

View Source DuESF.jsxinc, line 10622

# onCtrlAltClick()

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

View Source DuESF.jsxinc, line 10640

# onCtrlClick()

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

View Source DuESF.jsxinc, line 10634

# 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 DuESF.jsxinc, line 10646