Sign in Join
Wiki copytemporary

TCoolBar

English · Français · Русский

TCoolBar is a visible component on the Common Controls tab of the Component Palette that provides a (multiline) adjustable container for other controls, usually toolbars. The controls are arranged in rows and can be adjusted in size and position.

Getting started

Drop a TCoolbar on the form. It automatically aligns itself to the top of the form.

Adding controls to the coolbar

The coolbar is the container of toolbars, but any other controls can be added as well.

To add a control drop it from the component palette on the coolbar. Each dropped controls is assigned to a TCoolband instance inside the coolbar. At the left side of each coolband there is a grip which can be used to reposition the control. Alternatively, if the controls already exists outside the coolbar, drag its node in the object tree (above the object inspector) slightly below the node of the coolbar and drop it when the insertion line appears, or manually add an item to the Bands property in the object inspector and assign the control to the Control property of the band.

Set the coolbar's AutoSize to true to adjust the size of the coolbar to the size and number of the bands.

Dragging controls

By default the band of each dropped control extends over the full width of the coolbar and occupies an individual row.

You can rearrange the controls in the coolbar by grabbing them at the grip and dragging the grip, and the control along with it, to another location. Wherever the "drag" cursor appears you can drop the control at this new location. This way you can move the controls into a single row, or conversely, drag specific controls out of such a shared row into separate rows. Note that the latter task is a bit difficult: you must drag the mouse outside to entire coolbar, but not too far so that the "do not drop" cursor appears - in this case you cannot drop the control any more even if you move the mouse back.

When the FixedSize property of the bands (and of the coolbar) is false you can also change the width of the previous band in the same way. Here a "split" cursor appear to indicate this operation. You can still move the the control to a different location, but you must grab the band at the right of the grip so that the "split" cursor disappears. This may be a bit difficult to find, and it is probably easier to turn this feature off (FixedSize = true) if your main intention is to reposition controls.

Properties

Here is a list of the most important properties:

TCoolBar

TCoolBand

See also


From the Free Pascal wiki, page "TCoolBar", as it stood on 2023-01-13 after a change by Wp, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.