Sidebar

reference:scripting_reference:scripting_objects:buttoncontextdata

If a script add-in adds commands that require context-sensitive state information via the the OnButtonContext event, the method receives a ButtonContextData object whenever it needs to supply state information for a button.

Property Name Return Type Description

args

Args

Returns an Args object representing the function's parsed arguments.

cmdline

string

Provides the command line that triggered the request for context-sensitive state.

ctx

ButtonContext

Returns a ButtonContext object that is used to change the button's state.

method

string

Provides the command method name.

lister

Lister

Lister whose toolbar the button is visible on (0 if not applicable).

viewer

Viewer

Viewer whose toolbar the button is visible on (0 if not applicable).