Icon Looks TScaleLine

The TScaleLine control is used to show scale inside graphic window. All you need is place control to the graphic window and define scale proprty. Control shows line as series of black and white rectangles 1sm length with caption above.


TScaleLine Interface

type
  TScaleLine = class(TGraphicControl)
  public
    constructor Create(aOwner: TComponent); override;
    procedure UpdateWidth;
  published
    property Scale: Single;
    property Number: SmallInt Default 3;
    property BlackWhite: Boolean  Default FALSE;
  end;

constructor Create(aOwner: TComponent); override;

The Create method creates an instance of TScaleLine. Call Create to instantiate a TScaleLine at runtime. For TScaleLine objects placed on a form or data module at design time, Create is called automatically.


procedure UpdateWidth;

Call this method if you wish to set control's width to minimal width it needs for show itself. This method will be called automatically when you change Number property.


property Scale: Single;

This property defines scale the TScaleList will display.


property Number: SmallInt Default 3;

Thsi property defines amount of white/black blocks will be drawn. Each block has fized, ten millimetres lenght.


property BlackWhite: Boolean Default FALSE;

This property defines what rectangle begins black white series. By Default serie begins with white rectangle.