Difference between revisions of "Ide/Creating new Project Items/Creating a Toolbar"

From wiki.visual-prolog.com
m (Category)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>[[Category:Ide]]</noinclude>
<noinclude>[[Category:Ide/Create New Project Items]]</noinclude>
The '''Toolbar''' editor allows you interactively create various kinds of toolbars.
== Creating a Toolbar ==
 
To create and register a new toolbar in a project you need to use the '''File | New''' menu command. In the opened '''Create Project Item''' dialog you should select in the left pane the '''Toolbar''' type of created item. Then the dialog will accept the following shape:
==== Creating a New Toolbar ====
 
To create and register a new toolbar in a project you need to use the '''File | New''' menu command. In the opened '''Create Project Item''' dialog you should select in the left pane the '''Toolbar''' type of created item. Then the dialog will accept the following shape:


[[Image:Ide_MyToolbar_New.png]]
[[Image:Ide_MyToolbar_New.png]]
Line 18: Line 15:
:If you check the '''Existing Package''' radio button, then in the '''Package''' list button you should select one of the packages known to the project (the '''TaskWindow.pack''' in the picture). The files handling the created toolbar will be included into this package. The created files will be placed into the selected package subdirectory. The name of this subdirectory is displayed after the package name; it is <vp>(TaskWindow\)</vp> in the picture.
:If you check the '''Existing Package''' radio button, then in the '''Package''' list button you should select one of the packages known to the project (the '''TaskWindow.pack''' in the picture). The files handling the created toolbar will be included into this package. The created files will be placed into the selected package subdirectory. The name of this subdirectory is displayed after the package name; it is <vp>(TaskWindow\)</vp> in the picture.


==== Toolbar Attributes Dialog ====
=== Toolbar Attributes Dialog ===


After you press the '''OK''' button in the '''Create Project Item''' dialog, the '''Toolbar Attributes''' dialog appears.
After you press the '''OK''' button in the '''Create Project Item''' dialog, the '''Toolbar Attributes''' dialog appears.

Latest revision as of 15:18, 13 June 2013

Creating a Toolbar

To create and register a new toolbar in a project you need to use the File | New menu command. In the opened Create Project Item dialog you should select in the left pane the Toolbar type of created item. Then the dialog will accept the following shape:

Ide MyToolbar New.png

Name

In the Name field you should type in the name, which will be associated with this toolbar in the automatically generated code. This name should be a correct Visual Prolog name. It should be any sequence of letters, digits, and underscores, beginning with a letter. This name appears in names of files generated for handling the toolbar. These files appear in the project tree in the Project window. The Code Expert uses this name for generation of the name of class, which handle the toolbar.

Package

You should check one of the New Package or Existing Package radio buttons to specify whether the generated resource file and class, which handle the toolbar, will be included to the new package that will be created or will be included to the existing one.
If you check the New Package radio button, then you should type in the directory name in the Parent Directory field; it is (TaskWindow\) in the picture. The package and the toolbar handling files will be created and placed into the parent directory.
If you check the Existing Package radio button, then in the Package list button you should select one of the packages known to the project (the TaskWindow.pack in the picture). The files handling the created toolbar will be included into this package. The created files will be placed into the selected package subdirectory. The name of this subdirectory is displayed after the package name; it is (TaskWindow\) in the picture.

Toolbar Attributes Dialog

After you press the OK button in the Create Project Item dialog, the Toolbar Attributes dialog appears.

Ide ToolbarAttributes.png

The possible settings for a toolbar are:

Style

There are several toolbar styles. And since the layout of a toolbar simply shows the order of the controls it is easy to change the toolbar style.
The toolbar Style can be one of the following:
Toolbar Style Toolbar Location
Top Placed at the top of window
Left Placed at the left side of the window
Bottom Placed at bottom of window
Right Placed at the right side of the window
Inside Placed at a fixed location inside the window. (The Graphics Editor uses several of these)
Movable A floating toolbar, which the user can move around
Try to change the toolbar style to see the various layouts.

Title

Sets the title for the toolbar. It is disabled for all toolbar styles except for the Movable.

Position

Shows the toolbar position. The position can be set for the Inside and Movable toolbar styles.

Code

This group box contains the read only Class Name text field and the Update Code push button.
  • Class Name
    In this read-only control you can see the name of the class in which the IDE places the default code for the toolbar.
  • Update Code
    Click this push button to enforce code updating.

After clicking the OK button the new toolbar will be created and its name will be added to the existing toolbars for the current project. You can always go back and wake up the Toolbar Attributes dialog (with the Resource | Attribute task menu item or with the Attribute item from pop up menu) for the toolbar to change any of the toolbar attributes.