The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


TCrossHair = class (TPersistent)
               ...(removed for brevity)
               procedure Changed;
               procedure SetPos (xpos, ypos: double);
               property PosX: double read ...
               property PosY: double read ...
               property Color: TColor read ...
               property Layer: integer read ...
               property Mode: TCrossHMode read ...
               property LineType: TPenStyle read ...
               property LineWid: integer read ...
               property OnChange: TNotifyEvent read ...

The TCrossHair class has been declared to provide convenient access to layout parameters of the crosshairs within the object inspector. TCrossHair defines the form and layout of the crosshairs and contains the following sub-properties:

PosX: double; Position on x-axis.
PosY: double; Position on y-axis.
Color: TColor; Color of crosshair.
Layer: integer; Layer the crosshair belongs to.
Mode: TCrossHMode; Defines the layout of the crosshair (chOff... crosshair is switched off, chHoriz... horizontal linechVert... vertical line, chBoth... full crosshair)
LineType: TPenStyle; Pen style of crosshair. LineType may assume one of the following values: psSolid (solid line), psDot (dotted line), psDash (dashed line), psDashDot (dash-dot combinations), psDashDotDot (series of dash-dot-dot combinations). Note that the LineType will be effective only if LineWid is set to 1
LineWid: integer; Line width of the crosshair. Note that lines broader than 1 will always be drawn as solid line, even if LineType is set to some other value.
OnChange: TNotifyEvent; Event triggered when any parameter of the crosshair is changed.

Further this class declares the method SetPos to be able to set both the x and the y values of the crosshair position without triggering the OnChange event twice.

Last Update: 2016-Oct-02