by
ru
en
by

Avemey

logo
FilesMainLinksPhotosAnime

Lazarus/Delphi component ZCLabel

TZCLabel displays the text as TLabel, but text can be rotated to any angle.

For:
  • Lazarus
  • Delphi 6, 7, BDS 2005, BDS 2006, 2007, 2009, 2010, XE and XE2
  • C++Builder 5, 6 (tested only with CB6)
Key features:
  • rotation multi-line text with alignment (for TrueType fonts)
  • Drawing text on any canvas

Code samples.

Included into ZColorStringGrid.

zip zcolorstringgrid_bin_0_3.zip (1508Kb) - Source code + compiled examples.
zip zcolorstringgrid_src_0_3.zip (469Kb) - Source code.

ZCLabel скриншот

ZCLabel sample screenshot
Screenshots

Properties:
Property Description
AlignmentVertical: byte Vertical Alignment:
  • 0 - top
  • 1 - center
  • 2 - bottom
0 by default.
AlignmentHorizontal: byte Horizontal Alignment:
  • 0 - left
  • 1 - center
  • 2 - right
0 by default.
AutoSizeHeight: boolean If True then changing the height of the component to fit the text. False by default.
AutoSizeWidth: boolean If True then changing the width of the component to fit the text. False by default.
AutoSizeGrowOnly: boolean If True then the size can automatically only increase. False by default.
IndentVert: byte Vertical indentation. 0 by default.
IndentHor: byte Horizontal indentation. 3 by default.
LineSpacing: integer The distance between lines of text. 0 by default.
Rotate: integer The angle of rotation of the text. 0 by default.
SymbolWrap: boolean If True, the word wrapping is on any symbol, otherwise only the whitespace. False by default.
WordWrap: boolean If True then word wrapping is enabled. True by default.

Methods:
Method Description
procedure DrawTextOn(ACanvas: TCanvas; AText: string; var ARect: TRect; CalcOnly: boolean; ClipArea: boolean = false); overload; Draws text AText on canvas ACanvas
  • ACanvas: TCanvas - canvas
  • AText: string - text
  • ARect: TRect - rectangle for text
  • CalcOnly: boolean - if true then calculate ARect without drawing text
  • ClipArea: boolean - if true then cuts off the text that do not fit in ARect
procedure DrawTextOn(ACanvas: TCanvas; AText: string; var ARect: TRect; AColor: TColor; CalcOnly: boolean; ClipArea: boolean = false); overload; Draws text AText on canvas ACanvas using AColror color
  • ACanvas: TCanvas - canvas
  • AText: string - text
  • ARect: TRect - rectangle for text
  • AColor: TColor - text color
  • CalcOnly: boolean - if true then calculate ARect without drawing text
  • ClipArea: boolean - if true then cuts off the text that do not fit in ARect
FilesMainLinksPhotosAnime

Copyright © 2006-2012 Ruslan V. Neborak