Top
PowerCOBOL V11.0 Reference
FUJITSU Software

3.35 Toolbar Control

Description:

The Toolbar control can have single or multiple buttons.

Other controls can also be placed on the Toolbar control.

Sample image:

Details:

Details of the buttons are contained in Button objects.

For example, to refer to the title string (Caption property) of the second button of the Toolbar control, whose name is "Toolbar1", code:

   MOVE "Caption" OF Buttons (2) OF Toolbar1
     TO ...

However, other controls placed on toolbars are not referred to as part of the toolbar. For example, if the StaticText control whose name is "CmStatic1" is on the Toolbar control and you want to set its Caption property to "ABC", code:

MOVE "ABC" TO "Caption" OF CmStatic1

(NOT: MOVE "ABC" TO "Caption" OF CmStatic1 OF Toolbar1)

For each button that has an image, set the ImageIndex property to the index of the image within the image list containing the button images.

Image Lists:

The images for the toolbar buttons are held in image list files. The normal, enabled image is held in the file defined in the ImageList property. The disabled image is held in the file defined in the DisabledImageList property. If you want a different image when the mouse pointer is over the button (the typical behavior when you are using flat toolbar buttons) then you put those images in the file defined in the HotImageList property.

The general size of toolbar button bitmaps is 16x15 pixels. Therefore the width of the image list(s) should be a multiple of 16 and the height should be 15. For this type of image, set the ImageWidth of the image list (that you add to the module) to 16.

If the Align property is set to "3 - Left" or "4 - Right", the height of the control (the value of Height property) is the same as the value of the ClientHeight property of the Form object. Otherwise, the height of the control is set automatically depending on the size of the image list and Caption property of the Button objects on the Toolbar control. This means that you are not able to set the height of the control.

If the DisabledImageList or HotImageList property is not set, PowerCOBOL uses the image list defined in the ImageList property when the button is disabled or "hot".

The values of the ImageWidth property for the ImageList , DisabledImageList and HotImageList properties should be the same.

Properties:

Align

Array

BackColor

Buttons(a)

ClassMajorVersion

ClassMinorVersion

ClassProgID

Container

Count

Divider

DisabledImageList

ForeColor

Height

Highlight

HighlightColor

HotImageList

ImageList

Index

Left

Name

Parent

Printable

ScaleMode

ScalingStyle

ShowToolTips Style

TabGroup

TabIndex

ToolTipText

Top

UseSystemColor

Visible

Width

Wrapable

  • Methods:

Move

Refresh

ZOrder

  • Events:

ButtonClick

DropDown

MouseDown

MouseMove

MouseUp

Class ProgID name:

Fujitsu.PcobToolbarControl.4

Corresponding Control in PowerCOBOL V3.0 or earlier:

None