TCustomCoolBar class
Defines a Rebar-like control with resizable bands.
Declaration
TCustomCoolBar = class(TToolWindow)Inheritance
Descends from it: TCoolBar
Description
TCustomCoolBar is a
TToolWindow descendant which
defines a control like the Windows Rebar control. It provides a collection of
windowed controls which are displayed in movable, resizable bands.
Each band (or TCoolBand) on the control can have a configurable
sizing grip (or grabber), a bitmap, a text label, and a single windowed
control. The CoolBar handles the size and position for the control when its
band is moved. Each band can have a fixed size, or can automatically re-size
to the contained control. Bands can be displayed one band per line, or
re-sized and positioned to fill the available width or height for the CoolBar
control.
A common use case is hosting multiple toolbars in an application. Separate TToolbar instance are created and configured with event handlers or actions as needed. Each toolbar is assigned as the control for a band. A perfect example is the Lazarus IDE, which uses TCoolbar to host the file, view and run toolbars in its interface.
Do not create instances of TCustomCoolBar; use the TCoolBar descendant which sets the visibility for the properties in the control.
See also
Properties
Align | public | Contains the edge in the Parent where the control is aligned. |
BandBorderStyle | public | Border style used around bands on the control. |
BandMaximize | public | Indicates the action used to maximize the width for a band on the control. |
Bands | public | Collection with the bands defined for the control. |
Bitmap | public | Optional image displayed as the background for the cool bar control. |
FixedSize | public | Indicates if bands on the control have a fixed size. |
FixedOrder | public | Indicates if the order of the bands on the control is fixed or locked. |
GrabStyle | public | Drawing style used for a grabber or gripper displayed on the control. |
GrabWidth | public | Width for the grabber on the control. |
HorizontalSpacing | public | Horizontal space reserved between visual elements on the control. |
Images | public | Contains images displayed on the bands for the control. |
ImagesWidth | public | Width for the Images used in the control. |
ShowText | public | Indicates if text captions are displayed for the bands on the control. |
Themed | public | Enables or disables themed rendering for the control. |
Vertical | public | Indicates if the control is displayed vertically instead of horizontally. |
VerticalSpacing | public | Vertical space reserved between visual elements in the control. |
Methods
AlignControls | protected | Aligns the bands (and their controls) using the orientation, layout order, and anchors for the control. |
BitmapOrImageListChange | protected | Implements the OnChange handler used for Bitmap and Images. |
CalculatePreferredSize | protected | Calculates the preferred width and height for the control. |
CalculateAndAlign | protected | Calculates the size and position for visible bands using the orientation, layout, and order for the control. |
CalculateRealIndex | protected | Gets the real position for the band at the specified visible position. |
ChangeCursor | protected | Changes the cursor shape when a band, a grabber, or the control background is active. |
CMBiDiModeChanged | protected | Handles the CM_BIDIMODECHANGED message for the control. |
CreateWnd | protected | Creates the window handle for the control, and sets the cursor shape for the control background. |
DoFontChanged | protected | Calculates the text height and width in each of the bands when the font has been changed. |
DrawTiledBitmap | protected | Tile draws the specified bitmap on the control Canvas to fill the area in ARect. |
FontChanged | protected | Re-implements the OnChange event handler for the Font in the control. |
IsFirstAtRow | protected | Checks whether the band at the specified position is the first one on a row. |
IsRowEnd | protected | Indicates whether the band at the specified position is the last one on a row. |
MouseDown | protected | Handles mouse down messages for the control. |
MouseMove | protected | Handles mouse move messages for the control. |
MouseUp | protected | Handles mouse up messages for the control. |
Notification | protected | Handles the notification when a component is added to or removed from the control. |
Paint | protected | Draws the visible bands for the control on its Canvas. |
SetAlign | protected | Sets the value for the Align property. |
SetAutoSize | protected | Sets the value for the AutoSize property. |
SetCursor | protected | Sets the value for the Cursor property. |
WMSize | protected | Handles the LM_SIZE window message for the control. |
Create | public | Constructor for the class instance. |
Destroy | public | Destructor for the class instance. |
AutosizeBands | public | Indicates if a band is automatically resized to its Control. |
EndUpdate | public | Ends an update process for the control. |
Invalidate | public | Causes the control to be redrawn. |
InsertControl | public | Inserts a band for the specified control at the ordinal position in Index. |
MouseToBandPos | public | Gets the position for the band under the mouse pointer. |
RemoveControl | public | Removes the band with the specified control. |
Events
OnChange | public | Event handler signalled when Bands are re-sized or re-ordered using the mouse. |
Fields
FBorderEdges | protected | Members used for the realized EdgeBorders for the control. |
FBorderLeft | protected | Member used for the realized left border on the control. |
FBorderTop | protected | Member used for the realized top border on the control. |
FBorderRight | protected | Member used for the realized right border on the control. |
FBorderBottom | protected | Member used for the realized bottom border on the control. |
FBorderWidth | protected | Member used for the total width of realized borders on the control. |
FCursorBkgnd | protected | Member with the cursor shape when the mouse is over the cool bar background. |
FDragBand | protected | Member with the band being dragged in the control. |
FDraggedBandIndex | protected | -1 indicates the space below the last row; other negative values are an invalid area. |
FDragInitPos | protected | Initial mouse X - position (for resizing Bands). |
FLockCursor | protected | Member which indicates if the cursor shape can be changed for the control. |
FRightToLeft | protected | Member which indicates is bands are aligned in reverse (right-to-left) order. |
FTextHeight | protected | Member with the calculated text height used on the control. |
FVisiBands | protected | Member with the visible bands for the control. |
Types and constants
cDefGrabStyle | protected | Default value for the GrabStyle property. |
cDefGrabWidth | protected | Default value for the GrabWidth property. |
cDefHorSpacing | protected | Default value for the HorizontalSpacing property. |
cDefVertSpacing | protected | Default value for the VerticalSpacing property. |
cNewRowBelow | protected | Free space below the last row. |
cNewRowAbove | protected | Free space above the first row. |
Inherited
From TToolWindow (5)
AdjustClientRect BeginUpdate EdgeBorders EdgeInner EdgeOuter
From TCustomControl (8)
BorderStyle Canvas DestroyWnd OnPaint PaintWindow SetColor WMPaint WSRegisterClass
From TWinControl (228)
AddControl AllAutoSized AutoAdjustLayout AutoSizeDelayed AutoSizeDelayedHandle AutoSizeDelayedReport AutoSizePhases BeginUpdateBounds BorderWidth BoundsLockCount BroadCast Brush BrushCreated CachedClientHeight CachedClientWidth CanFocus CanSetFocus CanTab ChangeScale ChildClassAllowed ChildHandlesCreated ChildKey ChildSizing ClientRectNeedsInterfaceUpdate CMBorderChanged CMDoubleBufferedChanged CMEnabledChanged CMEnter CMExit CMParentDoubleBufferedChanged CMShowHintChanged CMShowingChanged CMVisibleChanged CNChar CNKeyDown CNKeyUp CNSysKeyDown CNSysKeyUp ContainsControl ControlAtPos ControlCount ControlKeyDown ControlKeyUp Controls ControlsAligned CreateBrush CreateDockManager CreateHandle CreateParams CreateParented CreateParentedControl CreateSubClass CustomAlignInsertBefore CustomAlignPosition DefaultHandler DefWndProc DesignerDeleting DestroyHandle DialogChar DisableAlign DoAddDockClient DoAdjustClientRectChange DoAlignChildControls DoAllAutoSize DoAutoSize DoChildSizingChange DockClientCount DockClients DockDrop DockManager DockOver DockSite DoConstraintsChange DoDockClientMsg DoDockOver DoDragMsg DoEnter DoExit DoFlipChildren DoFloatMsg DoGetDockCaption DoKeyDownBeforeInterface DoKeyPress DoKeyUpBeforeInterface DoRemainingKeyDown DoRemainingKeyUp DoRemoveDockClient DoSendBoundsToInterface DoSendShowHideToInterface DoSetBounds DoubleBuffered DoUnDock DoUndockClientMsg DoUTF8KeyPress EnableAlign EndUpdateBounds EraseBackground FinalizeWnd FindChildControl FindNextControl FixDesignFontsPPIWithChildren FixupTabList FlipChildren Focused FormEndUpdated GetAdjustedLogicalClientRect GetBorderStyle GetChildren GetChildrenRect GetClientOrigin GetClientRect GetControlIndex GetControlOrigin GetDeviceContext GetDockCaption GetEnumeratorControls GetEnumeratorControlsReverse GetMouseCapture GetParentHandle GetPreferredSizeClientFrame GetSiteInfo GetTabOrderList GetTextLen GetTopParentHandle Handle HandleAllocated HandleNeeded InitializeWnd IntfGetDropFilesTarget IntfUTF8KeyPress InvalidateBoundsRealized InvalidateClientRectCache InvalidatePreferredChildSizes IsClientHeightStored IsClientWidthStored IsControlMouseMsg IsFlipped IsResizing IsSpecialSubControl KeyDown KeyDownAfterInterface KeyDownBeforeInterface KeyPress KeyUp KeyUpAfterInterface KeyUpBeforeInterface Loaded LockRealizeBounds MainWndProc NotifyControls OnAlignInsertBefore OnAlignPosition OnDockDrop OnDockOver OnEnter OnExit OnGetDockCaption OnGetSiteInfo OnKeyDown OnKeyPress OnKeyUp OnUnDock OnUTF8KeyPress PaintControls PaintHandler PaintTo ParentDoubleBuffered ParentFormHandleInitialized ParentHandlesAllocated ParentWindow PerformTab RealGetText ReAlign RealizeBounds RealizeBoundsRecursive RealSetText ReloadDockedControl RemoveFocus Repaint ScaleBy ScaleControls ScrollBy ScrollBy_WS SelectFirst SelectNext SendDialogChar SendMoveSizeMessages SetBorderStyle SetBounds SetChildZPosition SetControlIndex SetDockManager SetFocus SetShape SetTempCursor ShowControl Showing TabOrder TabStop UnlockRealizeBounds Update UpdateControlState UpdateDockCaption UpdateShowing UseDockManager UTF8KeyPress VisibleDockClientCount WindowHandle WMChar WMContextMenu WMDestroy WMEnter WMEraseBkgnd WMExit WMKeyDown WMKeyUp WMKillFocus WMMove WMNotify WMSetFocus WMShowWindow WMSysChar WMSysKeyDown WMSysKeyUp WMWindowPosChanged WndProc WriteLayoutDebugReport WSSetText
From TControl (359)
AccessibleDescription AccessibleName AccessibleRole AccessibleValue Action ActionChange ActionLink ActiveDefaultControlChanged AddHandler AddHandlerOnBeforeDestruction AddHandlerOnChangeBounds AddHandlerOnEnabledChanged AddHandlerOnEnabledChanging AddHandlerOnKeyDown AddHandlerOnMouseWheel AddHandlerOnResize AddHandlerOnVisibleChanged AddHandlerOnVisibleChanging AdjustSize AnchorAsAlign AnchorClient AnchoredControlCount AnchoredControls AnchorHorizontalCenterTo AnchorParallel Anchors AnchorSame AnchorSide AnchorSideBottom AnchorSideChanged AnchorSideLeft AnchorSideRight AnchorSideTop AnchorToCompanion AnchorToNeighbour AnchorVerticalCenterTo AssignTo AutoSize AutoSizing AutoSizingAll AutoSizingLockCount BaseBounds BaseParentClientSize BeforeDestruction BeforeDragStart BeginAutoDrag BeginAutoSizing BeginDrag BiDiMode BorderSpacing BoundsChanged BoundsRect BoundsRectForNewParent BringToFront CalculateDockSizes CanAutoSize Caption CaptureChanged CaptureMouseButtons ChangeBounds Changed CheckChildClassAllowed CheckNewParent CheckOnChangeBounds Click ClientHeight ClientOrigin ClientRect ClientToParent ClientToScreen ClientWidth CMChanged CMCursorChanged CMHintShow CMHitTest CMMouseEnter CMMouseLeave CMParentBiDiModeChanged CMParentColorChanged CMParentFontChanged CMParentShowHintChanged CMSysFontChanged CMTextChanged CNPreferredSizeChanged Color ColorIsStored ConstrainedResize Constraints ControlFontClass ControlOrigin ControlState ControlStyle ControlToScreen CreateAccessibleObject CreateControlBorderSpacing CreateFloatingDockSite Cursor DblClick DefineProperties DesktopFont DisableAutoSizing DoAutoAdjustLayout DoBorderSpacingChange DoCallKeyEventHandler DoCallMouseWheelEventHandler DoCallNotifyHandler Dock Docked DockOrientation DockTrackNoTarget DoContextPopup DoDock DoEndDock DoEndDrag DoFixDesignFontPPI DoMouseDown DoMouseUp DoMouseWheel DoMouseWheelDown DoMouseWheelHorz DoMouseWheelLeft DoMouseWheelRight DoMouseWheelUp DoOnChangeBounds DoOnParentHandleDestruction DoOnResize DoOnShowHint DoScaleFontPPI DoStartDock DoStartDrag DragCanceled DragCursor DragDrop Dragging DragKind DragMode DragOver EditingDone EnableAutoSizing Enabled EnabledChanged EnabledChanging EndAutoSizing EndDrag ExecuteCancelAction ExecuteDefaultAction FindSubComponent FixDesignFontsPPI Floating FloatingDockSiteClass Font ForeignAnchorSideChanged FormIsUpdating GetAccessibleObject GetAction GetActionLinkClass GetAnchorsDependingOnParent GetCachedText GetCanvasScaleFactor GetChildAccessibleObjectAtPos GetClientScrollOffset GetColorResolvingParent GetControlClassDefaultSize GetCursor GetDefaultColor GetDefaultDockCaption GetDefaultHeight GetDefaultWidth GetDockEdge GetDragImages GetEnabled GetFloating GetFloatingDockSiteClass GetLogicalClientRect GetMousePosFromMessage GetPalette GetParentBackground GetParentComponent GetPopupMenu GetPreferredSize GetRGBColorResolvingParent GetScrolledClientRect GetSelectedChildAccessibleObject GetSidePosition GetTextBuf GetTopParent HandleObjectShouldBeVisible HasHelp HasParent Height HeightIsAnchored HelpContext HelpKeyword HelpType Hide Hint HostDockSite InitiateAction InvalidateControl InvalidatePreferredSize IsAParentAligning IsBorderSpacingInnerBorderStored IsCaptionStored IsControl IsControlVisible IsEnabled IsParentColor IsParentFont IsParentOf IsProcessingPaintMsg IsRightToLeft IsVisible Left LMCaptureChanged LoadedAll LRDockWidth ManualDock ManualFloat MouseCapture MouseEnter MouseInClient MouseLeave OnChangeBounds OnClick OnConstrainedResize OnContextPopup OnDblClick OnDragDrop OnDragOver OnEditingDone OnEndDock OnEndDrag OnMouseDown OnMouseEnter OnMouseLeave OnMouseMove OnMouseUp OnMouseWheel OnMouseWheelDown OnMouseWheelHorz OnMouseWheelLeft OnMouseWheelRight OnMouseWheelUp OnQuadClick OnResize OnShowHint OnStartDock OnStartDrag OnTripleClick Parent ParentBackground ParentBiDiMode ParentColor ParentDestroyingHandle ParentFont ParentFontChanged ParentShowHint ParentToClient Perform PopupMenu PositionDockRect QuadClick ReadBounds ReadState Refresh RemoveAllHandlersOfObject RemoveHandler RemoveHandlerOnBeforeDestruction RemoveHandlerOnChangeBounds RemoveHandlerOnEnabledChanged RemoveHandlerOnEnabledChanging RemoveHandlerOnKeyDown RemoveHandlerOnMouseWheel RemoveHandlerOnResize RemoveHandlerOnVisibleChanged RemoveHandlerOnVisibleChanging ReplaceDockedControl RequestAlign Resize Scale96ToFont Scale96ToForm Scale96ToScreen ScaleConstraints ScaleDesignToForm ScaleFontsPPI ScaleFontTo96 ScaleFontToScreen ScaleFormTo96 ScaleFormToDesign ScaleScreenTo96 ScaleScreenToFont ScreenToClient ScreenToControl SendToBack SessionProperties SetAction SetAnchors SetBiDiMode SetBoundsKeepBase SetDragMode SetEnabled SetHint SetInitialBounds SetName SetParent SetParentBackground SetParentBiDiMode SetParentComponent SetTextBuf SetVisible SetZOrder ShouldAutoAdjust Show ShowHelp ShowHint TBDockHeight Text TextChanged Top TripleClick UndockHeight UndockWidth UpdateAnchorRules UpdateBaseBounds UpdateMouseCursor UpdateRolesForForm UseRightToLeftAlignment UseRightToLeftReading UseRightToLeftScrollBar Visible VisibleChanged VisibleChanging Width WidthIsAnchored WindowProc WMCancelMode WMLButtonDBLCLK WMLButtonDown WMLButtonQuadCLK WMLButtonTripleCLK WMLButtonUp WMMButtonDBLCLK WMMButtonDown WMMButtonQuadCLK WMMButtonTripleCLK WMMButtonUp WMMouseHWheel WMMouseMove WMMouseWheel WMRButtonDBLCLK WMRButtonDown WMRButtonQuadCLK WMRButtonTripleCLK WMRButtonUp WMXButtonDBLCLK WMXButtonDown WMXButtonQuadCLK WMXButtonTripleCLK WMXButtonUp
From TLCLComponent (6)
DecLCLRefCount GetWSComponentClass IncLCLRefCount LCLRefCount NewInstance WidgetSetClass
From TComponent (64)
_AddRef _Release CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetTypeInfo GetTypeInfoCount iicrGetComponent InsertComponent Invoke IsImplementorOf Loading Name ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState
From TPersistent (4)
Assign FPOAttachObserver FPODetachObserver FPONotifyObservers
From TObject (35)
AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
