<< Click to display table of contents >> TSRVToolBar |
TSRVToolBar is a simple toolbar component.
Unit SRVToolBar.
Syntax
TSRVToolBar = class(TCustomControl)
TObject
TPersistent
TComponent
TControl
TWinControl
TCustomControl
TSRVToolbar is a container for buttons (TSRVToolButton).
The main features:
•all buttons in the toolbar have the same height and width;
•buttons are arranged in rows and columns;
•buttons can have different images for different states (normal, highlighted, disabled);
•button captions can be displayed in the bottom or the top part of the toolbar.
This component can be used directly, or inside a floating tool window (TSRVToolWindow), or inside a scrollbar area of TSRichViewEdit component (see TSRVPropertyTBH and TSRVPropertyTBV).
This class contains almost the same set of properties as TSRVCustomPropertyTB class and TSRVToolWindow component.
A toolbar consists of buttons and a hint area.
The hint area can be placed at the top or at the bottom of the toolbar, depending on AlignText property. A height of this area is defined in HintHeight property. This area can work as a "Cancel" button. When none of buttons is highlighted, it displays HintCancel. Otherwise, it displays Caption of tool button. A font for text displayed in this area is specified in HintFont.
Buttons are defined in Buttons collection. Buttons are arranged in rows and columns, the number of columns is specified in ButtonsCol. A size of buttons is defined in ButtonWidth and ButtonHeight properties. A spacing between buttons is specified in Spacer. A horizontal positions of buttons is defined by AlignButton and Indent properties.
The toolbar can have a border, its width is specified in BorderWidth.
The toolbar color is Color. Colors of disabled, pressed and highlighted buttons are specified in ColorDisable, ColorDown, and ColorSelect properties. A pen of frame around the toolbar is defined in PenFrame.