The TControlStyle type describes the current style of the control.
TControlStyle = set of (csAcceptsControls, csCaptureMouse, csDesignInteractive, csClickEvents, csFramed, csSetCaption, csOpaque, csDoubleClicks, csFixedWidth, csFixedHeight, csNoDesignVisible, csReplicatable, csNoStdEvents, csDisplayDragImage, csReflector, csActionClient, csMenuEvents, csNeedsBorderPaint, csParentBackground, csPannable, csAlignWithMargins);
(csAcceptsControls, csCaptureMouse, csDesignInteractive, csClickEvents, csFramed, csSetCaption, csOpaque, csDoubleClicks, csFixedWidth, csFixedHeight, csNoDesignVisible, csReplicatable, csNoStdEvents, csDisplayDragImage, csReflector, csActionClient, csMenuEvents, csNeedsBorderPaint, csParentBackground, csPannable, csAlignWithMargins) TControlStyle;
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 respond to these events. |
csDisplayDragImage |
If some 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. |
csPannable |
Set this In your control style if it is to support mouse panning. |
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 which need to show their parent's theme elements, such as a TPanel or TFrame that appear on a TPageControl. TWinControl introduces a protected ParentBackground property that includes/excludes the csParentBackground control style. |
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. |
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|