TiPositionComponent.AddLimit

TiPositionComponent See Also

Adds a limit pair to the component.

procedure AddLimit(PointerSize, PointerMargin : Integer; DrawScaleSide : Boolean; UpperValue, LowerValue : Double; UpperPointerColor, LowerPointerColor : TColor);

Description

Call AddLimit to add a limit pair to the component. Limits can only be added at runtime. Each limit pair has a upper and lower limit. To hide one of the limit pointers, use the LimitShowLowerPointer or LimitShowUpperPointer properties. The iKnob, iSlider, iLedBar, iLedSpiral components do not visually show the limit pointers.

If the Position property exceeds the limit upper value, the OnPositionOverLimit event will fire. If the Position property drops below the limit lower value, the OnPositionUnderLimit event will fire.

If more than one limit pair is added and there is a possibility that the limits pointers might overlap visually, use the PointerMargin property to offset the pointers.

Use the DrawScaleSide property of the limit to specify if the limit is drawn on the same side as the scale major tick labels.

Example

Delphi

iComponent.AddLimit(8, 5, False, 75, 25, clRed, clRed);

C++ Builder

iComponent->AddLimit(8, 5, False, 75, 25, clRed, clRed);

Contents | Index | Previous | Next