TMlSkinGroupBox

A group box that frames related controls with a line or a full box, optionally with a check box in the caption to enable the whole group.

Category
Lists & combo boxes
Unit
uMlSkinBoxCtrls.pas
Inherits from
TMlSkinCustomGroupBox → TMlSkinCustomControl

Notes

  • FrameStyle picks the look: fsLine draws just a caption line, fsBox a full frame.
  • CaptionHeight sets the caption height, CaptionAlignment its alignment, and CaptionLight can add a glow.
  • Turning on CheckBox puts a check box before the caption, typically used to enable or disable everything in the group.
  • The divider line can fade from LineStartColor to LineStopColor.
  • FrameStyle = fsCard gives a card: caption above a rounded card filled with CardColor — a good fit for grouping options on settings pages.

Example

From the demo MlSkin.MainDemo.v3.0 (.dfm form file)

object mlskngrpbx2: TMlSkinGroupBox
  Left = 862
  Top = 26
  Width = 185
  Height = 114
  Caption = 'GroupBox2'
  CheckBox.Pictures = 'MlSkinCheckBox'
  ...

Properties 10

NameTypeDefaultDescription
CaptionAlignmentTAlignmenttaLeftJustifyAlignment of the caption.
CaptionLightTMlLightClass—Glow effect for the caption.
Captionstring—The text shown on the control.
CaptionHeightInteger15Height of the caption area in pixels.
CardColorTColorclNoneOnly for FrameStyle = fsCard: the card fill color. clNone (default) draws the border only.
CheckBoxTGroupBoxCheckBox—The check box in front of the caption; it is typically used to enable or disable everything in the group.
LineStartColorTColor$00CFA753Starting colour of the divider line.
LineStopColorTColor$00FEFBF6Ending colour of the divider line, giving a gradient with the start colour.
LightBooleanFalseGlow effect: switch, glow color and blur radius.
FrameStyleTGroupBoxFrameStylefsLineFrame style: fsLine only a caption line, fsBox a full rectangle, fsCard a card (caption above, then an anti-aliased rounded card with its border in LineStartColor and fill in CardColor). See TGroupBoxFrameStyle.
Properties of TMlSkinCustomControl 5
NameTypeDefaultDescription
AboutTMlAboutInfo—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.
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
OnDPIChangedTMlDPIChangedEvent—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.
OnBackgroundChangingTMlBackgroundEvent—Fires just before the background changes, giving you a chance to adjust what is drawn.
OnBackgroundChangedTMlCustomDrawEvent—Fires after the background has been drawn, so you can paint on top of it.
OnVisibleChangedTNotifyEvent—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.