Vcl.Controls.TControlStyle

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

type TControlStyle = set of (csAcceptsControls, csCaptureMouse, csDesignInteractive, csClickEvents, csFramed, csSetCaption, csOpaque, csDoubleClicks, csFixedWidth, csFixedHeight, csNoDesignVisible, csReplicatable, csNoStdEvents, csDisplayDragImage, csReflector, csActionClient, csMenuEvents, csNeedsBorderPaint, csParentBackground, csPannable, csAlignWithMargins, csGestures, csPaintBlackOpaqueOnGlass, csOverrideStylePaint);

C++

typedef System::Set<Vcl_Controls__31, Vcl_Controls__31::csAcceptsControls, Vcl_Controls__31::csOverrideStylePaint> TControlStyle;

Properties

Type Visibility Source Unit Parent
set
typedef
public
Vcl.Controls.pas
Vcl.Controls.hpp
Vcl.Controls Vcl.Controls

Description

The TControlStyle type describes the current style of the control.

TControlStyle defines a set of style flags indicating control attributes.


The following table lists the flags and their meanings:

Flag Meaning

csAcceptsControls

The control becomes the parent of any controls dropped on it at design time.

csCaptureMouse

The control captures mouse events when it is clicked.

csDesignInteractive

The control maps right mouse button clicks at design time into left mouse button clicks to manipulate the control.

csClickEvents

The control can receive and respond to mouse clicks.

csFramed

The control has a 3D frame.

csSetCaption

The control's Caption should match the Name property if it has not been explicitly set to something else.

csOpaque

The control completely fills its client rectangle.

csDoubleClicks

The control can receive and respond to double-click messages. Otherwise, map double-clicks into clicks.

csFixedWidth

The width of the control does not vary or scale.

csFixedHeight

The height of the control does not vary or scale.

csNoDesignVisible

The control is not visible at design time.

csReplicatable

The control can be copied using the PaintTo method to draw its image to an arbitrary canvas.

csNoStdEvents

Standard events such as mouse, key, and click events are ignored. This flag allows an application to run faster when there is no need to respond to these events.

csDisplayDragImage

If a control that has an associated drag image list is dragged across a control with this setting, then the image list is used to enhance the drag cursor while the cursor is over it. Otherwise, the drag cursor is used on its own.

csReflector

The control responds to Windows dialog messages, focus messages, or size change messages. Use this setting if the control can be used as an ActiveX control, so that it receives notification of these events.

csActionClient

The control is linked to an action object. This flag is set when the Action property is set, and cleared if the Action property is cleared.

csMenuEvents

The control responds to system menu commands.

csNeedsBorderPaint

Only applicable when Themes are enabled in applications on Windows XP. Causes the ThemeServices to paint the border of a control with the current theme.

csParentBackground

Only applicable when Themes are enabled in applications on Windows XP. Causes the parent to draw its background into the control's background. This is useful for controls that need to show their parent's theme elements, such as a TPanel or TFrame that appears on a TPageControl. TWinControl introduces a protected ParentBackground property that includes/excludes the csParentBackground control style.

csPannable

Set this in your control style if it is to support mouse panning.

csAlignWithMargins

Use the Margins property of the control to govern the spacing relative to other controls that are aligned with this one. The controls are not allowed to be any closer than the spacing specified in Margins. This spacing is maintained as controls are moved when the parent control resizes.

csGestures

The control can receive and respond to gestures.

csPaintBlackOpaqueOnGlass

If the user uses an aero theme, when the control gets the focus, the black areas of the control become transparent.

csOverrideStylePaint

The control can override painting style.


See Also