Name: choose

Type: command

Syntax: choose <toolName> tool

Summary: <select|Selects> a <tool> or <paint tool>.

Introduced: 1.0

OS: mac,windows,linux

Platforms: desktop,server,web

Example:
choose browse tool

Example:
choose tSavedTool tool

Parameters:
toolName (enum): One of the basic tools from the Tools palette, or one of the paint tools from the Paint palette. The basic tools are: The paint tools are: 	* select: select a rectangle in an image 	* pencil: draw freehand in an image 	* bucket: fill a shape in an image 	* brush: draw brushstrokes in an image 	* eraser: erase an area in an image 	* spray can: draw airbrush strokes in an image 	* rectangle: draw a rectangle or square shape 	* line: draw a straight line in an image 	* round rect: draw a rectangle with rounded corners in an image 	* oval: draw an oval or circle shape in an image 	* polygon: draw a polygon in an image 	* curve: draw a curved line in an image 	* regular polygon: draw a regular polygon shape in an image 	* dropper: pick up a color from an image
- "browse":  perform actions such as clicking buttons and typing in fields
- "pointer":  select, move, or resize objects
- "button":  create all styles of button objects
- "field":  create all styles of field objects
- "scrollbar":  create all styles of scrollbar objects
- "graphic":  create all styles of graphic objects
- "image":  create paint images
- "player":  create sound and video player objects

Description:
Use the <choose> <command> to <select> <object|objects>, create <object|objects>, or paint under scripted <control>.

The tool you choose is effective for all editable windows, until you choose another tool. (The Browse tool is always in effect for stacks whose cantModify <property> is true, and for <stacks> being displayed as a <palette>, <modeless dialog box|modeless dialog>, or <modal dialog box|modal dialog>.)

All types of graphics are drawn with the single Graphic tool. To draw a specific shape, first draw with the Graphic tool, then set the style <property> of the new <graphic> to the shape you want. (You can also set the <style> of the <templateGraphic> to the shape you want, then draw the <graphic> with the Graphic <tool(function)>. The <graphic> icons on the Tools <palette> work this way: each one sets the <style> of the <templateGraphic>, then chooses the Graphic tool.)

Similarly, all types of buttons, fields, and scrollbars can be drawn with the single tool for that object type. You specify a particular kind of button, field, or scrollbar by setting its style <property>.

>*Note:* You must choose <tool(glossary)|tools> by name. The <HyperCard> method of choosing <tool(glossary)|tools> by number is not supported in LiveCode.

References: spray (property), penPattern (property), brushPattern (property), style (property), tool (property), paintCompression (property), magnify (property), selected (property), polySides (property), lineSize (property), selectedObjectChanged (message), newTool (message), browse (keyword), button (keyword), bucket (keyword), eraser (keyword), brush (keyword), curve (keyword), dropper (keyword), graphic (keyword), field (keyword), templateGraphic (keyword), property (glossary), select (glossary), command (glossary), tool (glossary), HyperCard (glossary), control (glossary), modal dialog box (glossary), modeless dialog box (glossary), paint tool (glossary), selectedImage (function), tool (function), stacks (function), select (command), palette (command), topLevel (command), reset cursors (command), rotate (command), drag (command), flip (command), click (command), object (object)
