TMlSkinSpeedometer

A speedometer gauge with a needle and a scale, used for network speed tests and similar readouts.

Category
Progress & gauges
Unit
uMlSkinSpeedometer.pas
Inherits from
TMlSkinCustomSpeedometerTMlSkinCustomControl

Notes

  • Value is the current reading and MinValueMaxValue the range of the dial.
  • ArrowWidth sets the needle thickness and CircleThickness the thickness of the scale ring.
  • Colors holds the colours of the dial, scale and needle, and FontTicks is the font of the scale numbers.

Example

From the demo MlSkin.Demo.TMlSkinSpeedometer.网络测速.v4.x (.dfm form file)

object MlSkinSpeedometer1: TMlSkinSpeedometer
  Left = 56
  Top = 34
  Width = 326
  Height = 335
  Colors.CircleProgressColor = 3181398
  Value = 0
  FontTicks.Charset = ANSI_CHARSET
  FontTicks.Color = 13411945
  FontTicks.Height = -15
  FontTicks.Style = []
  ...

Properties 7

NameTypeDefaultDescription
ArrowWidthInteger15Thickness of the needle in pixels.
CircleThicknessInteger23Thickness of the scale ring in pixels.
ColorsTSpeedometerColorsColours of the gauge parts: dial background, ticks, needle and the value text.
ValueInteger50The current value.
FontTicksTFontFont of the scale numbers.
MaxValueInteger100Highest value allowed.
MinValueInteger0Lowest value allowed.

Events 1

NameTypeDefaultDescription
OnChangedTNotifyEventFires after the state or value has changed.
Properties of TMlSkinCustomControl 5
NameTypeDefaultDescription
AboutTMlAboutInfoA design-time property: double-clicking it in the Object Inspector opens the MLSkin about box with the component version. It has no effect at run time and is not stored in the .dfm.
TransparentBooleanTrueTransparent background: the control skips its own fill and shows the form background (image or color) instead.
ColorTColorclWhiteBackground color of the control; ignored while Transparent is on.
AutoInvalidateBooleanFalseRepaints automatically when the content changes. Turn it on if property changes do not show up.
EraseBackgroundBooleanFalseWhether the background is erased before painting; worth toggling if the control flickers.
Events of TMlSkinCustomControl 4
NameTypeDefaultDescription
OnDPIChangedTMlDPIChangedEventFires when the screen DPI changes, for example when the window moves to a monitor with a different scaling — a good place to re-adjust anything you draw yourself.
OnBackgroundChangingTMlBackgroundEventFires just before the background changes, giving you a chance to adjust what is drawn.
OnBackgroundChangedTMlCustomDrawEventFires after the background has been drawn, so you can paint on top of it.
OnVisibleChangedTNotifyEventFires when the control is shown or hidden.

Only the properties and events MLSkin adds are listed here. Standard VCL properties such as Align, Anchors, Font and OnClick are available too and behave exactly as on the stock controls.

Offline helpA PDF / CHM version is available for offline reading.