TControlStyles Type

Specifies the style and behavior of a control.

Namespace: CNClrLib.Control.EnumTypes
type
 TControlStyles = CNClrlib.EnumTypes.TControlStyles;

Field
Description

csContainerControl

If true, the control is a container-like control.

csUserPaint

If true, the control paints itself rather than the operating system doing so. If false, the Paint event is not raised. This style only applies to classes derived from Control.

csOpaque

If true, the control is drawn opaque and the background is not painted.

csResizeRedraw

If true, the control is redrawn when it is resized.

csFixedWidth

If true, the control has a fixed width when auto-scaled. For example, if a layout operation attempts to rescale the control to accommodate a new Font, the control's Width remains unchanged.

csFixedHeight

If true, the control has a fixed height when auto-scaled. For example, if a layout operation attempts to rescale the control to accommodate a new Font, the control's Height remains unchanged.

csStandardClick

If true, the control implements the standard OnClick behavior.

csSelectable

If true, the control can receive focus.

csUserMouse

If true, the control does its own mouse processing, and mouse events are not handled by the operating system.

csSupportsTransparentBackColor

If true, the control accepts a BackColor with an alpha component of less than 255 to simulate transparency. Transparency will be simulated only if the csUserPaint bit is set to true and the parent control is derived from Control.

csStandardDoubleClick

If true, the control implements the standard OnDoubleClick behavior. This style is ignored if the csStandardClick bit is not set to true.

csAllPaintingInWmPaint

If true, the control ignores the window message WM_ERASEBKGND to reduce flicker. This style should only be applied if the csUserPaint bit is set to true.

csCacheText

If true, the control keeps a copy of the text rather than getting it from the Handle each time it is needed. This style defaults to false. This behavior improves performance, but makes it difficult to keep the text synchronized.

csEnableNotifyMessage

If true, the OnNotifyMessage(Message) method is called for every message sent to the control's WndProc(Message). This style defaults to false. csEnableNotifyMessage does not work in partial trust.

csDoubleBuffer

If true, drawing is performed in a buffer, and after it completes, the result is output to the screen. Double-buffering prevents flicker caused by the redrawing of the control. If you set csDoubleBuffer to true, you should also set csUserPaint and csAllPaintingInWmPaint to true.

csOptimizedDoubleBuffer

If true, the control is first drawn to a buffer rather than directly to the screen, which can reduce flicker. If you set this property to true, you should also set the AllPaintingInWmPaint to true.

csUseTextForAccessibility

Specifies that the value of the control's Text property, if set, determines the control's default Active Accessibility name and shortcut key.