Skip to content

Latest commit

 

History

History
53 lines (42 loc) · 1.31 KB

AddButtonMode.md

File metadata and controls

53 lines (42 loc) · 1.31 KB

AddButtonMode

Description

Adds an image button to the mode bar for a tool. Replaces vstAddButtonMode.

PROCEDURE AddButtonMode(imageSpecifier : DYNARRAY[] of CHAR);
def vs.AddButtonMode(imageSpecifier):
    return None

Parameters

Name Type Description
imageSpecifier DYNARRAY[] of CHAR The string identifier for the image. It should be of the form "ResourceFileNameWithoutExtension/PathOfImageFile".

Examples

{add a preferences button}
   AddButtonMode('Vectorworks/ModeViewBar/Options.svg');

	{add a preferences button}
{	vstAddButtonMode (kModeButton_7_ID); }
    AddButtonMode('Vectorworks/ModeViewBar/Options.svg');

{ ---------------------------------}
{ ------- OnToolDoSetup -----------}
{ ---------------------------------}
kOnToolDoSetupEventID: BEGIN
	AddButtonMode('VWMiscSmallImages/11016.png');
	BeginModeButtonsText;
	SetModeButtonText( GetPluginString( 6000 ), 2 );
	EndModeButtonsText;
	vstSetPtBehavior(kPolyPointTool);
import vs

# Adds an image button to the mode bar for a tool.
imageSpecifier = 'Example'

vs.AddButtonMode(imageSpecifier)
newObj = vs.LNewObj()  # handle to the newly created object

Version

Availability: from Vectorworks 2012

Category