TMlHLSTrackBar
An HLS track bar: dragging the thumb adjusts hue, saturation or lightness — the control behind a skin-colour picker.
Notes
MinandMaxbound the range,Valuereads and writes the current position, and dragging firesOnChange.Kindselects whether the bar drives hue, saturation or lightness, and the colour strip behind it changes to match.Thumbsupplies the image used for the slider handle.
Example
From the demo MlSkin.Demo.360安全卫士.v3.1 (.dfm form file)
object tkB: TMlHLSTrackBar
Tag = 2
Left = 16
Top = 140
Width = 296
Height = 28
Kind = hlsB
Thumb = 'MlSkinSlider_dragBackground'
Max = 100
Min = -100
OnChange = tkHChange
end
Properties 8
| Name | Type | Default | Description |
|---|---|---|---|
About | TMlAboutInfo | — | A 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. |
Kind | THLSKindRec | — | What this bar controls — hue, saturation or lightness — which also changes the colour strip behind it. |
Thumb | TMlResID | — | Image used for the slider thumb, given as a resource ID or file path. |
Max | Integer | 10 | Upper bound of the range. |
Min | Integer | 0 | Lower bound of the range. |
Value | Integer | 0 | The current value; dragging the thumb changes it and fires OnChange. |
Transparent | Boolean | True | Whether the background is transparent. |
Color | TColor | clWhite | Background color of the control; ignored while Transparent is on. |
Events 1
| Name | Type | Default | Description |
|---|---|---|---|
OnChange | TNotifyEvent | — | Fires when the content changes. |
Properties of TMlSkinCustomControl 2
| Name | Type | Default | Description |
|---|---|---|---|
AutoInvalidate | Boolean | False | Repaints automatically when the content changes. Turn it on if property changes do not show up. |
EraseBackground | Boolean | False | Whether the background is erased before painting; worth toggling if the control flickers. |
Events of TMlSkinCustomControl 4
| Name | Type | Default | Description |
|---|---|---|---|
OnDPIChanged | TMlDPIChangedEvent | — | Fires 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. |
OnBackgroundChanging | TMlBackgroundEvent | — | Fires just before the background changes, giving you a chance to adjust what is drawn. |
OnBackgroundChanged | TMlCustomDrawEvent | — | Fires after the background has been drawn, so you can paint on top of it. |
OnVisibleChanged | TNotifyEvent | — | Fires 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.