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....



CrossHairSetup


Unit: SDL_rchart
Class: TRChart
Declaration: procedure CrossHairSetup (ch: integer; chColor: TColor; Mode: TCrossHMode; LineType: TPenStyle; LineWidth: integer);

RChart provides up to four independent crosshair cursors which may be displayed in addition to the data. These crosshairs are not part of the data container and may be configured and utilized by using the methods CrossHairSetup and CrossHairSetPos. The method CrossHairSetup defines various parameters of a particular crosshair ch :

chColor Color of the crosshair
Mode Type of crosshair cursor: Mode may take one of the following values:
chOff (crosshair is switched off)
chHoriz (horizontal line across the chart)
chVert (vertical line across the chart)
chBoth (full crosshair)
chCrossBox (small crosshair with bull eye)
chBox (square box)
LineType Pen style for crosshair: LineType may assume one of the following values:
psSolid (sloid 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 LineWidth is set to 1
LineWidth 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.

Hint 1: Switching any of the crosshairs on slows down panning and zooming by approx. 30 %

Hint 2: A better alternative for the property CrossHairSetup is the property CrossHair1..4.

Example: This method is used in the following example program (see http://www.lohninger.com/examples.html for downloading the code): rchmouse



Last Update: 2023-Dec-13