Create and Edit Toolbars (Concept)

AutoCAD

 
Create and Edit Toolbars
Concept Procedure Quick Reference
 
 
 

Some of the simplest toolbar customizations can make your daily drawing tasks more efficient. For example, you can consolidate frequently used commands and controls onto one toolbar, remove buttons that you never use, or change some simple toolbar properties.

Show Me: Create a Toolbar

Click the Play arrow below the following image to start the animation.

The following animation shows how to create a custom toolbar, and place both standard and custom commands on it.

You can also specify information to be displayed when the cursor passes over a button.

Customize a Toolbar

You can add buttons or remove buttons you use infrequently, and rearrange buttons and toolbars. You can also create your own toolbars and flyout toolbars, and create or change the button image associated with a command. When creating a toolbar, you can create a toolbar from scratch, create a copy of an existing toolbar, or create a toolbar from an existing pull-down menu.

NoteSub-menu items are not included when a toolbar is created from a pull-down menu.
NoteWhen you create a toolbar, you should determine in which workspaces you want to display the toolbar. By default, a new toolbar is displayed in all workspaces.

The following table shows the properties of the Standard toolbar as they appear in the Properties pane.

Properties for the Standard toolbar

Properties pane item

Description

Example

Name

String used as the caption for the toolbar.

Standard

Description

Text used to describe the element; does not appear in the user interface.

Standard Toolbar

On By Default

Specifies whether the toolbar is displayed or not the first time the CUI file is loaded. The values are Hide or Show.

Show

Orientation

Specifies whether the toolbar is floating or docked (top, bottom, left, or right) the first time the CUI file is loaded.

Top

Default X Location

Specifies the location from the left edge of the screen when the toolbar appears when it is floating, or the location when it is docked. If docked, a value of 0 indicates the left most location in a docked area.

0

Default Y Location

Specifies the location from the top edge of the screen when the toolbar appears when it is floating, or the location when it is docked. If docked, a value of 0 indicates the top most location in a docked area.

0

Rows

Specifies the number of rows the items on the toolbar are displayed in when the toolbar is floating.

1

Aliases

Specifies the aliases for the toolbar. Click the [] button to open the Aliases dialog box. Each alias in the CUI file should be unique and it is used to reference the toolbar programmatically.

TB_STANDARD, Standard

Element ID

Tag that uniquely identifies a toolbar.

ID_TbStandard

NoteThe properties On By Default, Orientation, Default X Location, Default Y Location, and Rows are used only the first time the CUI file is loaded and when no default workspace is set. After a toolbar is loaded the first time, a workspace can be used to control the Appearance properties of a toolbar. See the procedure To change the properties of a toolbar for more information.

When you create a new toolbar, the first task you need to do is to provide a name for it. A new toolbar has no commands or controls assigned to it. If a toolbar has no commands or controls on it, it is ignored by the program until you add at least one command or control to it. You add commands and controls to a toolbar by dragging a command or control from an existing toolbar or the Command List pane and dropping it onto a toolbar. Once a command or control has been added to a toolbar, you can change the text that is displayed in the tooltip when the cursor hovers over top of the button by changing the Name property that is displayed in the Properties pane.

Flyouts

A flyout is a set of buttons nested under a single button on a toolbar. Flyout buttons have a black triangle in the lower-right corner. To create a flyout, you can start from scratch, drag an existing toolbar onto another toolbar, or drag a pull-down menu onto another toolbar. When a pull-down menu is dragged onto another toolbar, a new toolbar is created and a flyout is created in the position that the pull-down menu was dropped onto the toolbar.

The following table shows the Zoom flyout properties as they appear in the Properties pane.

Properties for the Zoom flyout on the Standard toolbar

Properties pane item

Description

Example

Name

String that does not appear in the user interface unless the property Use Own Button is set to Yes.

Zoom

Description

Text used to describe the element, does not appear in the user interface.

 

Source Toolbar

A read-only value used to specify which toolbar is being referenced to create the flyout.

TB_ZOOM

Use Own Button

Controls whether the last used toolbar button is set as the current button or not. The possible values are Yes or No.

No

Small Image

ID string of the small-image resource (16 × 16 bitmap). The string must include alphanumeric characters with no punctuation other than a hyphen (-) or an underscore (_). It can also be a user-defined bitmap. Click the [] button to open the Select Image File dialog box.

RCDATA_16_ZOOM

Large Image

ID string of the large-image resource (32 × 32 bitmap). If the specified bitmap is not 32 × 32, the program scales it to that size. The string must include alphanumeric characters with no punctuation other than a hyphen (-) or an underscore (_). It can also be a user-defined bitmap. Click the [] button to open the Select Image File dialog box

RCDATA_16_ZOOM

WarningDo not change the aliases for a toolbar that is being used as a flyout; otherwise the link between the toolbar and flyout will become broken.

Customize Toolbars with the Toolbar Preview Pane

You can customize a toolbar using the tree view under the Customizations In <file name> pane or the Toolbar Preview pane. The Toolbar Preview pane allows you to add and remove commands or controls visually in real-time instead of just using the tree view. You can also interactively drag a command or control in the preview pane to reposition it.

Customize Toolbars from the Application Window

The program allows you to customize toolbars that are displayed in the application when the Customize User Interface (CUI) Editor is open. You can drag commands from the Command List pane and drop then directly onto a visible toolbar that is docked or floating in the application window. You can also remove, reposition, or copy commands while the CUI Editor is open.