TMlSkinGroupControls

A grouped option control that lays a set of choices out in columns, with one selected at a time — a graphical radio group.

Category
Panels & containers
Unit
uMlSkinGroupControls.pas
Inherits from
TMlSkinCustomGroupControlsTMlSkinCustomPanelTMlSkinCustomControl

Notes

  • The captions go into Items and the current choice is read and written through ItemIndex.
  • Columns sets how many columns are used, while ItemHeight and VerticalSpacing control the height and spacing of each row.
  • Use OnDrawItem to draw the entries yourself.

Properties 24

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.
ColumnsInteger1How many columns the entries are laid out in.
ItemIndexInteger-1Index of the selected entry, starting at 0; -1 means nothing is selected.
ItemsTStringsThe list of entry captions, one per line.
ItemHeightInteger17Height of each entry in pixels.
KindTGroupControlKindgckRadioThe control's kind or orientation.
OffsetTMlOffsetOverall offset (X, Y) of the content.
VerticalSpacingInteger3Vertical gap between rows in pixels.
PicturesTMlResIDThe images used by the control, split into frames per state: unchecked, checked, hot, disabled.
AlphaByte192Opacity: 0 fully transparent, 255 opaque.
BorderAlphaByte255Border opacity from 0 (invisible) to 255 (solid).
BorderSidesTSidesWhich border edges are drawn — any combination of top, bottom, left and right.
BorderColorTColor$00D9CBBABorder color.
ColorTColorclWhiteBackground color of the control; ignored while Transparent is on.
BackgroundFillTypeTMlPngFillTypeftNormalHow the background image is laid out: ftNormal as-is, ftTile tiled, ftAutoStretch auto-stretched, ftCenter centred, ftStretch stretched to fill, ftGradient gradient.
BackgroundImageTMlResIDBackground image, given as a resource ID or an image file path.
BackgroundOffsetXInteger0Horizontal offset of the background image in pixels.
BackgroundOffsetYInteger0Vertical offset of the background image in pixels.
GradientDirectionTGradientDirectiongdVerticalGradient direction: gdHorizontal or gdVertical.
GradientAlignTGradientAligngaCenterWhere the gradient is anchored: centre, left or right.
GradientSizeInteger60Size of the gradient band in pixels.
GradientStartColorTColor$00FFC446Starting color of the gradient.
GradientEndColorTColor$00FDF8F3Ending color of the gradient.
DoubleBorderBooleanTrueDouble border: draws a second line inside the border.

Events 2

NameTypeDefaultDescription
OnChangedTNotifyEventFires after the state or value has changed.
OnDrawItemTMlGCItemDrawEnventFires while an entry is drawn, so you can style it yourself.
Events of TMlSkinCustomPanel 1
NameTypeDefaultDescription
OnCustomDrawTMlCustomDrawEventCustom draw event: paint your own content after the control has drawn itself.
Properties of TMlSkinCustomControl 3
NameTypeDefaultDescription
TransparentBooleanTrueTransparent background: the control skips its own fill and shows the form background (image or color) instead.
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.