[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'ComCtrls' (#lcl)

TCoolBand

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Implements a band displayed on the TCoolBar control.

Declaration

Source position: comctrls.pp line 2425

type TCoolBand = class(TCollectionItem)

protected

Const

  cDefMinHeight = 25

  

Default value for the MinHeight property.

  cDefMinWidth = 100

  

Default value for the MinWidth property.

  cDefWidth = 180

  

Default value for the Width property.

  cDivider = cDivider; = 2

  

Default width used for dividers on the control.

  cGrabIndent = cGrabIndent; = 2

  

Default indentation used for the grabber (sizing grip).

  FControlLeft: Integer;

  

Left coordinate for the Control in the band.

  FControlTop: Integer;

  

Top coordinate for the Control in the band.

  FTextWidth: Integer;

  

Width (pixels) for the value in the Text property.

  function CalcControlLeft;

  

Calculates the left coordinate for the Control in the band.

  function CalcPreferredHeight;

  

Calculates the band height using the orientation and settings in the parent control.

  function CalcPreferredWidth;

  

Calculates the band width using the orientation and settings in the parent control.

  procedure CalcTextWidth;

  

Gets the number of pixels needed for Text using the Font in the parent control.

  function GetDisplayName; override;

  

Gets the display name for the collection item.

public

  constructor Create(); override;

  

Constructor for the class instance.

  destructor Destroy; override;

  

Destructor for the class instance.

  procedure Assign(); override;

  

Copies property values from the specified persistent object to the current class instance.

  procedure AutosizeWidth;

  

Gets the width needed for the band when its parent Control is auto-sized.

  procedure InvalidateCoolBar();

  

Causes the parent control to be redrawn when the collection item is changed.

  property Height: Integer; [r]

  

Height needed for the band and its visual elements.

  property Left: Integer; [r]

  

Left coordinate for the band.

  property Right: Integer; [r]

  

Right coordinate for the band.

  property Top: Integer; [r]

  

Top coordinate for the band.

published

  property Bitmap: TBitmap; [rws]

  

Bitmap image displayed for the band.

  property BorderStyle: TBorderStyle; [rw]

  

Border style drawn around the band.

  property Break: Boolean; [rw]

  

Indicates whether the band starts a new row (or column) in the TCoolBar control.

  property Color: TColor; [rws]

  

Background color for the band.

  property Control: TControl; [rw]

  

Control displayed on the band.

  property FixedBackground: Boolean; [rw]

  

Indicates if a fixed background is drawn for the band.

  property FixedSize: Boolean; [rw]

  

Indicates whether the band is drawn with a fixed size.

  property HorizontalOnly: Boolean; [rw]

  

Indicates if the band is limited to the horizontal orientation.

  property ImageIndex: TImageIndex; [rw]

  

Ordinal position for the image displayed for the band.

  property MinHeight: Integer; [rw]

  

Minimum height for the band.

  property MinWidth: Integer; [rw]

  

Minimum width for the band.

  property ParentColor: Boolean; [rw]

  

Indicates if the Color in the Parent control (TCoolBar) is used for the band.

  property ParentBitmap: Boolean; [rw]

  

Indicates if the Bitmap for the TCoolBar control is used as the background for the band.

  property Text: TTranslateString; [rw]

  

Text displayed as the identifier or caption for the band.

  property Visible: Boolean; [rw]

  

Indicates whether the band is visible on the parent control.

  property Width: Integer; [rw]

  

Width for the band in pixels.

end;

Inheritance

TCoolBand

  

Implements a band displayed on the TCoolBar control.

|

TCollectionItem

|

TPersistent,IFPObserved

|

TObject

Description

TCoolBand is a TCollectionItem descendant which implements a band displayed on the TCoolBar control.

A band contains a single Control that is displayed as a movable, sizable area on the TCoolBar control. It has a Grabber (sizing grip) that is used to move and resize the band. It can also have a bitmap image and text displayed at the start of the band prior its Control. The band be configured with a fixed size, and may occupy the entire width for the TCoolBar.

TCoolBand is the type used for the items in the TCoolBands collection.

See also

TCoolBands

  

Implements a collection for TCoolBand items.

TCoolBar.Bands

  

Collection with the bands defined for the control.


Version 3.2 Generated 2024-02-25 Home