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



Using TMeter


The unit SDL_meter contains a visual component which supports the display of analog meters (the good old index instruments). The meter component can be configured both as a linear or a logarithmic device. Optionally the meter can indicate two values (properties Value and ValueSec) on the same dial. In order to make the second needle visible you have to set the Visible property of NeedleLayoutSec to TRUE. The layout of the two indicators can be controlled by the values of the NeedleLayout and NeedleLayoutSec properties.

The meter can cover different angles from a mere 90 degrees to an unrestricted circular dial by setting the MeterLayout property. The caption of the meter is specified by the property Caption.

The colors of the meter are determined by the following properties: ColorBakG, ColorCover and ColorScale. Further, the background of the scale can be colored individually in three different regions (low, normal, high) by setting the properties ColorSclBkHigh, ColorSclBkLow and ColorSclBkNorm (set ScaleBkVisible to TRUE to activate this feature). The width of the colored scale background is determined by ScaleBkWidth. The boundaries between the three regions are controlled by the properties ThresholdLow and ThresholdHigh. Addionally the underflow and overflow conditions can be indicated by special boxes displayed in the upper left and right corner of the meter (properties LimWatchLowOn and LimWatchHighOn). The colors of these indicators can be set by LimWatchPsvColor and LimWatchActColor.


The overall layout of the meter can be influenced in many ways by the properties AnchorCovered, AnchorImage, AnchorSize, BackGroundImg, BkgndFillMode, RimBottom, RimSide, RimTop and FrameStyle.

The scale of the meter is controlled by the properties MeterDecPlaces, MeterMaxValue, MeterMinValue, MeterNrTicks, MeterScaleLine, MeterShortTicks and ScaleVisible.

The events OnBeforeDrawNeedle, OnBeforeDrawScaleLabel and OnMeterRendered support the flexible user-specific adaption of the display.


Last Update: 2023-Dec-15