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

# TCoolBand.CalcTextWidth

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

## Declaration

Source position: comctrls.pp line 2500

`protected procedure TCoolBand.CalcTextWidth;`

## Description

Updates the internal value used in the class instance when the parent TCoolBar control has been assigned. The TextWidth method in the Canvas on the parent control is used to get width for the value in the Text property.

## See also

TCoolBand.Text |  | Text displayed as the identifier or caption for the band.
TCoolBands |  | Implements a collection for TCoolBand items.
TCoolBar |  | Implements a Rebar-like control with resizable bands.
TCustomControl.Canvas |  | The drawing surface for the control.