User Tools

Site Tools


Sidebar

<< Back


koda:en:documentation:create_toolbar

Creating a Toolbar

Toolbars usually have buttons with icons on them. Icons are picked up from imagelists. The Imagelist must already exist, so if you have not already created it, do so now, using ImageList Editor

Adding a Toolbar control to a Form is like adding any other control:

  1. Click on the Toolbar control icon in the Palette
  2. In the Design Area, drag and drop to define an area for the control

Koda redefines the area, because toolbars are always at the top of a form.

To attach an Imagelist to the Toolbar, in Object Inspector, click to the right of Images and choose your Imagelist.

To add a button to the Toolbar,

  1. Right-click in an empty area of the Toolbar
  2. Choose Add a button. A button is created with Koda's choice of an icon

To choose an icon for the Toolbutton:

  1. Select the ImageList either in Object Treeview or in the Design Area
  2. In Object Inspector, double-click to the right of Images. ImageList Editor opens
  3. Note the number (imageindex) of the icon to appear on the Toolbutton
  4. Click on the button to select it
  5. In Object Inspector, click to the right of ImageIndex and enter the number noted in Step 3
  6. Optionally, set other properties for the Toolbutton at this point. They are explained here (scroll down to Button).

As you design a Toolbar, you will need to differentiate between selecting the control as a whole and selecting a particular icon. This can be done in Object Treeview by clicking on the correct node, but doing it in the Design Area requires clicking in the Toobar but not where there is a Toolbutton.

To delete a ToolButton:

  1. Click on the button to select it
  2. Right-click and choose Delete from the context menu. Alternatively, press the Del.

To move a Toolbutton to a different position in the Toolbar, drag and drop it.

A Form can have multiple Toolbars. If there is already one Toolbar, Koda adds the new Toobar above the other(s).

To move a Toolbar relative to another Toolbar, change the value of Top.

koda/en/documentation/create_toolbar.txt · Last modified: 2014/07/10 10:48 (external edit)