This unit contains basic classes for visual controls. mrNone Series of constants to be used as respones in message boxes etc. mrNone=0 mrOK Series of constants to be used as respones in message boxes etc. mrOK=1 mrCancel Series of constants to be used as respones in message boxes etc. mrCancel=2 mrAbort Series of constants to be used as respones in message boxes etc. mrAbort=3 mrRetry Series of constants to be used as respones in message boxes etc. mrRetry=4 mrIgnore Series of constants to be used as respones in message boxes etc. mrIgnore=5 mrYes Series of constants to be used as respones in message boxes etc. mrYes=6 mrNo (not the same as mrNone) Series of constants to be used as respones in message boxes etc. mrNo=7 mrAll Series of constants to be used as respones in message boxes etc. mrAll=8 mrNoToAll Series of constants to be used as respones in message boxes etc. mrNoToAll=9 mrYesToAll Series of constants to be used as respones in message boxes etc. mrYesToAll=10 mrLast Series of constants to be used as respones in message boxes etc. mrLast=mrYesToAll=10 TCMMouseWheel - record holding data about the Mouse Wheel
Details held include:
          the Message associated with the wheel;
          the shift state (ie whether Shift, Alt, Control etc keys have been pressed);
          wheel data which can either be 
	  a position (X, Y coordinates) or 
	  a position plus an integer result.
TAlign - the available options for aligning a Control Type defining the three mouse buttons (left, middle, right) crHigh - a cursor constant crDefault - cursor constant: use default cursor (0) crNone - a cursor constant: no cursor (-1) crArrow - cursor constant: Arrow cursor (-2) cursor constant crIbeam - cursor constant: shows I-beam cursor often used in text editors (-4) crSizeNESW - cursor constant: runs diagonally from NorthEast to SouthWest (-6) crSizeNS - cursor constant: cursur runs from North to South (-7) crNWSE - cursor constant: cursor runs from NorthWest to SouthEast crSizeWE - cursor constant: runs from West to East (-9) cursor constant crSizeN - cursor constant: cursor North (-24) crSizeNW - cursor constant: NorthWest (-23) cursor constant cursor constant crUpArrow - cursor constant: cursor is Up-Arrow (-10) crHourGlass - cursor constant: shows hour-glass (wait while action proceeds) (-11) crDrag - cursor constant: shows dragging cursor (-12) cursor constant cursor constant cursor constant crHandPoint - cursor constant: Pointing Hand (-21) TControlStyleType - describes features of the Control
Enumerated type comprising:
    csAcceptsControls, // can have children in the designer
    csCaptureMouse,
    csDesignInteractive, // wants mouse events in design mode
    csClickEvents,
    csFramed,
    csSetCaption,
    csOpaque,
    csDoubleClicks,// control understands mouse double clicks
    csTripleClicks,// control understands mouse triple clicks
    csQuadClicks,  // control understands mouse quad clicks
    csFixedWidth,
    csFixedHeight, // control cannot change its height (for example combobox)
    csNoDesignVisible,
    csReplicatable,
    csNoStdEvents,
    csDisplayDragImage,
    csReflector,
    csActionClient,
    csMenuEvents,
    csNoFocus,
    csNeedsBorderPaint, // not implemented
    csParentBackground, // not implemented
    csDesignNoSmoothResize, // no WYSIWYG resizing in designer
    csDesignFixedBounds, // control can not be moved nor resized in designer
    csHasDefaultAction, // control implements useful ExecuteDefaultAction
    csHasCancelAction,   // control implements useful ExecuteCancelAction
    csNoDesignSelectable, // control can not be selected at design time
    csOwnedChildsSelectable // child controls owned by this control are selectable in the designer
TControlStateType - describes possible states (status) of Control The base class for the canvas property of several graphic controls, such as TGraphicControl and TCustomControl TCanvas Create this instance of Control Canvas Destroy this Control Canvas and free its resources The Control object for which this is the Canvas Reads or writes a flag to determine the identity of the Control object cursor constant The base class for many objects that are designed to be dragged and dropped Destroy this instance of TDragObject Assigns a particular source to this drag object Finds out a lot of information about the source object, such as its operating-system handle, size, position, how much the mouse is allowed to move before the object is moved, and whether the object is to be kept visible during the drag process. The object, with all its properties, that is to be dragged Find name of the object for dragging The object's name returned as a string Procedure for hiding the drag image during movement ShowDragImage // exist only for compatibility zero Procedure for keeping the image visible during movement HideDragImage Is this drag object being cancelled? Reads or sets flag to determine whether this drag image is being cancelled. Property has a boolean value, true if cancelling Finds Operating-System handle for this object Reads or writes flag for operating-system handle Find position for this object Reads or writes flag with position (as X, Y co-ordinates) The position of the taget control object to which the currect object is to be dragged Reads or writes flag with position (X, Y co-ordinates) of control object to which the current object is to be dragged The control object to which the current object is to be dragged (target) Reads or writes flag with identity of the target control object to which the currect object is to be dragged Has the drag object been dropped yet? Boolean property, true if the object has been dropped; reads or writes a flag with this information An ancestor class for many drag control objects Creates an instance of this object The control object that is to be dragged Reads or writes flag with identity of object for dragging Assigns source object Overrides definition in parent class The object that is to be dragged The identity of the control to be dragged Reads or writes flag with identity of control object A base class for managing the docking process The declaration contains a number of procedure definitions that are 'virtual' and 'abstract'.
This means that there is no implementation specified:
these essentially represent 'place-holders', and it is the responsibility of the developer of descendant classes
to override these methods and implement them as desired.
TControlBorderSpacing - the spacing around a Control { TControlBorderSpacing defines the spacing around a control. The spacing around its children and between its children is defined in TWinControl.ChildSizing. Left, Top, Right, Bottom: integer; minimum space left to the autosized control. For example: Control A lies left of control B. A has borderspacing Right=10 and B has borderspacing Left=5. Then A and B will have a minimum space of 10 between. Around: integer; same as Left, Top, Right and Bottom all at once. This will be added to the effective Left, Top, Right and Bottom. Example: Left=3 and Around=5 results in a minimum spacing to the left of 8. InnerBorder: integer; This is added to the preferred size. For example: A buttons widget returns 75x25 on GetPreferredSize. CalculatePreferredSize adds 2 times the InnerBorder to the width and height. CellAlignHorizontal, CellAlignVertical: TControlCellAlign; Used for example when the Parents.ChildSizing.Layout defines a table layout. } TAnchorSide
TAnchorSide

    Class holding the reference sides of the anchors of a TControl.
    Every TControl has four AnchorSides:
    AnchorSide[akLeft], AnchorSide[akRight], AnchorSide[akTop] and
    AnchorSide[akBottom].
    Normally if Anchors contain akLeft, and the Parent is resized, the LCL
    tries to keep the distance between the left side of the control and the
    right side of its parent client area.
    With AnchorSide[akLeft] you can define a different reference side. The
    kept distance is defined by the BorderSpacing.
    
    Example1:
       +-----+  +-----+
       |  B  |  |  C  |
       |     |  +-----+
       +-----+

      If you want to have the top of B the same as the top of C use
        B.AnchorSide[akTop].Side:=asrTop;
        B.AnchorSide[akTop].Control:=C;
      If you want to keep a distance of 10 pixels between B and C use
        B.BorderSpacing.Right:=10;
        B.AnchorSide[akRight].Side:=asrLeft;
        B.AnchorSide[akRight].Control:=C;

      Do not setup in both directions, because this will create a circle, and
      circles are not allowed.
      
    Example2:
            +-------+
      +---+ |       |
      | A | |   B   |
      +---+ |       |
            +-------+
            
      Centering A relative to B:
        A.AnchorSide[akTop].Side:=arsCenter;
        A.AnchorSide[akTop].Control:=B;
      Or use this. It's equivalent:
        A.AnchorSide[akBottom].Side:=arsCenter;
        A.AnchorSide[akBottom].Control:=B;


TControl - the main ancestor class for visual controls.

TControl is the main ancestor class for all visual controls.

The definition includes a large number of constants, types and methods that are inherited by derived classes and types.

These include devices for defining and controlling:

  • the state and position of the object (including alignment and anchoring),
  • the state of the mouse,
  • whether dragging or docked,
  • the size and type of border,
  • the way child components should behave,
  • the actions to be taken in response to various events,
  • and the way the Control should be drawn.

Properties defined here can be overridden by descendant classes.

Function to get text-string associated with control Uses RealGetText rather than GetTextBuf to avoid unnecessary read-writes to PChar buffers GetTextBuf The function returns the required text as a string Stores text in buffer Uses RealSetText rather than SetTextBuf to avoid unnecessary read-writes to PChar buffer RealSetText SetTextBuf The text string to be stored in the buffer DoAutoSize - method for actually performing the AutoSize

TControl.DoAutoSize

IMPORTANT: Many Delphi controls override this method and many call this method directly after setting some properties.

During handle creation not all interfaces can create complete Device Contexts which are needed to calculate things like text size.

That's why you should always call AdjustSize instead of DoAutoSize.

AutoSizeCanStart - checks whether DoAutoSize is permitted to start
{------------------------------------------------------------------------------
  function TControl.AutoSizeCanStart: boolean;
  
  Returns true if DoAutoSize can start. That means, it tests the minimum
  requirements to start. Some controls need even more.

  It returns false if
  - AutoSize=false
  - or the control is currently autosizing
  - or the control is not visible
  - or the control is destroying
------------------------------------------------------------------------------}
CalculatePreferredSize - find default/preferred height and width

CalculatePreferredSize - find default/preferred height and width

procedure TControl.CalculatePreferredSize

(var PreferredWidth, PreferredHeight: integer; WithThemeSpace: Boolean);

Calculates the default/preferred width and height for a control, which is used by the LCL autosizing algorithms as default size. Only positive values are valid. Negative or 0 are treated as undefined and the LCL uses other sizes instead.

TWinControl overrides this and asks the interface for theme dependent values. See TWinControl.CalculatePreferredSize for more information.

WithThemeSpace: If true, adds space for stacking.

For example: TRadioButton has a minimum size. But for stacking multiple TRadioButtons there should be some space around. This space is theme dependent, so the parameter is passed to the widgetset.

{ try to set the automatic changed bounds
  If the interface does not like our bounds, it sends a message with the real
  bounds, which invokes the automatic realigning of the control, .. a circle.
  To break the circle, only bounds that are different from the last try will
  be sent.
}
Gets the rectangular coordinates for a child control The function returns the coordinates of the child rectangle True if the rectangle is scrolled Click - a procedure that allows the programmer to simulate a mouse click over the control, and initiates the same Action as that associated with the OnClick event AssignTo - copies some of its properties to another control (Dest) Function to get a text-string associated with the control This is the function that is actually used by GetTextBuf, and loads a string rather than performing read-write to a PChar buffer GetTextBuf RealSetText SetTextBuf The Function returns the required text as a string Procedure to store text associated with the control in a string This is the procedure that is actually used by SetTextBuf, and stores text as a string rather than performing read-write to a PChar buffer SetTextBuf RealGetText GetTextBuf The text-string that is to be stored ParentFormHandleInitialized - called by ChildHandlesCreated of parent form

The form is a real connection to the target screen.

For example, the gtk under X gathers some screen information, but not before form creation.

But this information is needed to create DeviceContexts, which are needed to calculate Text Size and such stuff needed for AutoSizing.

That's why AdjustSize delays AutoSizing till this moment.

Now do the AutoSize.

Whether auto-size is to be used

// standard properties, which should be supported by all descendants

AutoSize permits the size of a control to be adjusted automatically, for example a button can become bigger or smaller to accommodate a longer or shorter caption.

Reads logical (boolean) flag to see whether auto-sizing is to be operated, or writes the flag to say it should be done. Default is false, ie no auto-sizing

DragCursor - the style of cursor to be used during the Drag process DragMode - whether manual or automatic ParentFont - should the control use the same font as the parent? Default is true ParentColor - should the control have the same colour as the parent? Default is true ParentShowHint - does the control adopt the same hinting behaviour as its parent? Default is true Text - the character string in the name or caption of the control

Text - the character string in the name or caption of the control

But BEWARE: Text is used in another context in editing controls such as TEdit and TCustomEdit, TLabeledEdit and TCustomLabeledEdit, where it contains the character string that is being edited in the Edit Box.

Event Handler for constrained resize

Event handler needs to be supplied to cover the need to resize a control within the given constraints of maximum and minimum width and height

Event handler to supply information when a context-sensitive pop-up menu is required Event Handle for mouse double-click

Double-clicking is much more common in a Windows environment than in Unix or Linux, where single-clicking is the default method for selecting an object. However, in all environments there could be valid use for a double-click, and a method should be supplied if appropriate.

Event handler for mouse triple-click Event handler for quadruple click Event handler for the Drag-Drop manoeuvre Event handler for the case when a control is dragged over another control Event handler for the end of a docking manoeuvre Event handler for the end of a dragging process Event handler for when a mouse button is pressed down Event handler for mouse movement within the current control Event handler for when the mouse button is released, ie "up" Event handler for when the mouse enters the area of the current control Event handler for when the mouse leaves the area of the current control Event handler for the start of a docking manoeuvre Event handler for start of dragging process Event handler when editing is done FCompStyle - deprecated
// DEPRECATED. Enables (valid) use of 'IN' operator (this
      // is a hack for speed. It will be replaced by the use of the widgetset
      // classes.
      // So, don't use it anymore.        
DragDrop - Procedure to govern Dragging/Dropping of control The object to be dragged and dropped The X co-ordinate to which the object is to be dropped (target) The Y co-ordinate to which the object is to be dropped (target) Dock - Procedure governing Docking of Control

Dock - Procedure governing Docking of Control

Performs checks that there is already a valid host control to which the present control is to be docked, removes old controls from the list of docked controls and adds the new control to the list, then calls DoDock to perform the actual docking process

An exception is raised if there is already a docking process in progress for this control
The host control to which which the current control is to be docked The position at which the control is to be docked ManualDock - permits operator-defined docking

Docks this control to DropControl or on NewDockSite.

If DropControl is not nil, ControlSide defines on which side of DropControl this control is docked. (alNone,alClient for stacked in pages). DropControl will become part of a TDockManager.

If DropControl is nil, then DropControl becomes a normal child of NewDockSite and ControlSide is ignored.

The function returns True if a manual dock has been successfully performed The new site to which the control is docked, if DropControl has been found to be nil If nil (default) then ignored else used as the control for docking, on side specified by ControlSide The side on which the control is to be docked, if DropControl is not nil ManualFloat - the opposite of ManualDock, allows operator to Float a control
function TControl.ManualFloat(TheScreenRect: TRect;
    KeepDockSiteSize: Boolean = true): Boolean;

  Undock and float.
  Float means here: create the floating dock site and dock this control into it.
  Exception: Forms do not need float dock sites and float on their own.

The function returns True if a manual float has been succesfully performed The rectangle within which the floating control is located The rectangle within which the floating control is located
(ie the location of the floating dock site to which the control is docked)
Remove a previously docked control and put a new control in its place Checks to see whether there is a previously docked control,
and removes it, then puts the new control in its place
ManualDock
Returns True if a docked control has been successfully replaced with a new one The old control that was previously docked at this site The new site for docking; used if DropControl is nil The control site to be used for docking, unless it is nil when it is igored. Passed straight through as an argument to ManualDock The side to which the new control is to be aligned; passed straight through as an argument to ManualDock Returns True if the control is being dragged Returns True if the control is being dragged AdjustSize - Smart way to DoAutoSize

TControl.AdjustSize calls DoAutoSize in a smart fashion.

During loading and handle creation the calls are delayed.

This method initially does the same as TWinControl.DoAutoSize. But since DoAutoSize is commonly overriden by descendant components, it is not useful to perform all tests, which can result in too much overhead. To reduce this the LCL calls AdjustSize instead.

Auto-sizing has been delayed until some other process is complete Returns True if auto-sizing has been delayed AnchorToNeighbour - anchoring instructions
{------------------------------------------------------------------------------
  procedure TControl.AnchorToNeighbour(Side: TAnchorKind; Space: integer;
    Sibling: TControl);

  Setup AnchorSide to anchor one side to the side of a neighbour sibling.
  For example Right side to Left side, or Top side to Bottom.
 ------------------------------------------------------------------------------}
The side on which we should anchor The size of the space to be left around the control when anchoring The sibling control to which we should anchor AnchorParallel - instructions for anchoring beside another control

AnchorParallel - instructions for anchoring beside another control

Sibling - another control beside which the current control is to be anchored

The side on which we should anchor to the sibling The size of the space to be left around the control when anchoring The sibling control to which we should anchor in a parallel manner AnchorHorizontal - instructions for anchoring Another control to which the current control is to be anchored, centred horizontally AnchorVertical - instructions for anchoring Another control to which the current control is to be anchored, centred vertically Sets the boundaries defining the position of the current control Height, Width, and position of Top Left pixel The X co-ordinate of the top left pixel of the control The Y co-ordinate of the top left pixel of the control The width of the control The height of the control Sets the bounds of the control initially, when it is created Checks that this is a new control,
then calls SetBounds to set up coordinates defining its position
SetBounds
X co-ordinate of top left pixel Y co-ordinate of top left pixel Width of control Height of control Returns default/preferred height and width, to be used in autosizing algorithms

GetPreferredSize - find default/preferred height and width

procedure TControl.GetPreferredSize 
        (var PreferredWidth, PreferredHeight: integer; 
          WithThemeSpace: Boolean);

Returns the default/preferred width and height for a control, which is used by the LCL autosizing algorithms as default size. Only positive values are valid. Negative or 0 are treated as undefined and the LCL uses other sizes instead.

WithThemeSpace: If true, adds space for stacking.

For example: TRadioButton has a minimum size. But for stacking multiple TRadioButtons there should be some space around. This space is theme dependent, so the parameter is passes to the widgetset

TWinControl overrides this and asks the interface for theme dependent values. See TWinControl.CalculatePreferredSize for more information.

Create a new Control - Constructor

Create a new Control - Constructor. Overrides constructors of ancestor classes and sets a number of defaults. Often overridden by descendant classes.

Destroy the Control when you have finished with it

Destructor for Control. Detaches control from parents, removes graphics, frees memory and Operating System handles, pointers etc.

Overrides destructors of ancestor classes, and in turn may be overridden by descendant classes.

EditingDone - what to do when you have finished editing

TControl.EditingDone

Called when user has finished editing. This procedure can be used by data links to commit the changes.

For example:

  • When focus switches to another control (default)
  • When user selected another item

It's totally up to the control, what events will commit.

What to do when the RETURN button is pressed, signifying default action What to do when ESCAPE is hit (or the CANCEL button is selected) - signifying CANCEL BeginDrag - starts the dragging of a control
{------------------------------------------------------------------------------
  Method: TControl.BeginDrag
  Params: Immediate: Drag behaviour
          Threshold: distance to move before dragging starts
                     -1 uses the default value of Mouse.DragThreshold
  Returns: Nothing

  Starts the dragging of a control. If the Immediate flag is set, dragging
  starts immediately.
 ------------------------------------------------------------------------------}
If True, start drag as soon as cursor starts to move Least value for movement of cursor before drag starts If True, start drag as soon as cursor starts to move Bring the control to the front of the viewed screen Colour is stored Function returns True if colour has been stored This control has a parent Function returns True if there is a parent This control is the parent of another control Function returns True if this control is a parent, ie there is a child control The control of which this control is a parent (ie the Child control) The control is visible on the current desktop Function returns True is control is visible Hide this control Refresh the data on this control Repaint the control, ie refill its canvas Render this control non-valid Function checks whether a particular child class is allowed Function returns True if child class has been checked and is allowed The child class which is being checked to see whether it is allowed Boolean set to True if a non-valid class is found and an exception has been raised Checks a new parent for this control The new parent associated with this control Send to back, ie place this control behind all other controls in the current screen; it will not be visible unless the controls in front are transparent Sets a temporary cursor The temporary cursor which has been set Update the roles for this form; see whether there have been any changes in its role Gets text associated with the control from a buffer
* The VCL implementation relies on the virtual Get/SetTextBuf to 
 * exchange text between widgets and VCL. This means a lot of 
 * (unnecesary) text copies.
 * The LCL uses strings for exchanging text (more efficient).
 * To maintain VCL compatibility, the virtual RealGet/SetText is
 * introduced. These functions interface with the LCLInterface. The
 * default Get/SetTextbuf implementation calls the RealGet/SetText.
 * As long as the Get/SetTextBuf isn't overridden Get/SetText 
 * calls RealGet/SetText to avoid PChar copying.
 * To keep things optimal, LCL implementations should always 
 * override RealGet/SetText. Get/SetTextBuf is only kept for
 * compatibility.
RealGetText GetText
Pointer to the buffer containing the text Pointer to the buffer containing the string Length of the buffer Stores text associated with the control in a buffer
* The VCL implementation relies on the virtual Get/SetTextBuf to 
 * exchange text between widgets and VCL. This means a lot of 
 * (unnecesary) text copies.
 * The LCL uses strings for exchanging text (more efficient).
 * To maintain VCL compatibility, the virtual RealGet/SetText is
 * introduced. These functions interface with the LCLInterface. The
 * default Get/SetTextbuf implementation calls the RealGet/SetText.
 * As long as the Get/SetTextBuf isn't overridden Get/SetText 
 * calls RealGet/SetText to avoid PChar copying.
 * To keep things optimal, LCL implementations should always 
 * override RealGet/SetText. Get/SetTextBuf is only kept for
 * compatibility.
RealSetText SetText
Pointer to the buffer where the text is to be stored Adjust from Screen coodrinates to Client-relative coordinates Convert from Client coordinates to Screen coordinates Adjust from Screen coordinates to Control-relative coordinates Convert from control-relative coordinates to absolute screen coordinates Makes the control visible. Perform the Update method specified by the parent control (if there is one) The action to be associated with this control

// standard properties, which should be supported by all descendants

The (default) action to be associated with this control

Can either read the action already associated with the control (GetAction), or write an action to be associated (SetAction)

Used to align the control in one of four directions.

// standard properties, which should be supported by all descendants

Either reads a flag containing alignment instructions (FAlign) or writes alignment instructions (SetAlign)

May have no alignment, may have custom or client alignment, or can be aligned to top, bottom, left or right

The set of anchor definitions for this control

// standard properties, which should be supported by all descendants

Determines how the control is to be anchored to its client or parent conrol

Either reads a flag containing the set of anchors to be used, or writes a set of anchors. If they have been written, this is indicated in IsAnchorsStored

Finds which side to use for anchor

// standard properties, which should be supported by all descendants

Finds which side is to be used to anchor this control, and what relationships it has to other controls nearby.

For complex relationships, use the Side property of the parent class TAnchorSide, and make a reference eg using asrCenter

Determines the border spacing for this control

// standard properties, which should be supported by all descendants

Determines the border spacing for this control

Reads flag to find stored spacing values required for the border of the control, or writes the flag to set the spacing.

The properties are defined in the parent class TControlBorderSpacing

Determines the rectangle bounding this control

// standard properties, which should be supported by all descendants

Finds the values for the bounding rectangle, or sets the values.

Bounding rectangle (top-left, bottom-right) is defined in TRect

//**QUESTION - why should we get/set bounds for new parent? // standard properties, which should be supported by all descendants Caption - the text-string appearing on the Control, usually used to identify its function

Gets caption as a text-string (GetText), or stores the new caption (SetText). Shows flag if caption is stored (IsCaptionStored).

By default, the Caption appears the same as the control Name in the Object Inspector, and the developer needs to set it explicitly to some new text.

The VCL implementation relies on the virtual Get/SetTextBuf to exchange text between widgets and VCL. This means a lot of (unnecesary) text copies.

The LCL uses strings for exchanging text (more efficient). To maintain VCL compatibility, the virtual RealGet/SetText is introduced. These functions interface with the LCLInterface.

The default Get/SetTextBuf implementation calls the RealGet/SetText. As long as the Get/SetTextBuf isn't overridden Get/SetText calls RealGet/SetText to avoid PChar copying.

To keep things optimal, LCL implementations should always override RealGet/SetText. Get/SetTextBuf is only kept for compatibility.

ClientHeight - determines the height of the client within which the control exists

// standard properties, which should be supported by all descendants

Finds or sets the client height, and sets a flag if it has been stored

ClientOrigin - Top left pixel of the client within which the control exists

// standard properties, which should be supported by all descendants

Finds origin of client (read-only)

ClientRect - finds the position of the rectangle for the client within which the control exists

// standard properties, which should be supported by all descendants

ClientRect - finds the coordinates of the rectangle for the client within which the control exists (read-only)

ClientWidth - determines the width of the client within which the control exists

// standard properties, which should be supported by all descendants

ClientWidth - determines the width of the client within which the control exists; reads the width of the client control or sets the value. Sets flag if value is stored

Determine the colour for the current control

// standard properties, which should be supported by all descendants

Reads the value for colour, or stores the value, and sets a flag if the colour is stored.

The default colour is the same as the window in which the control is located.

Determine Constraints (max and min height and width) for this control

// standard properties, which should be supported by all descendants

Determine Constraints (max and min height and width) for this control; reads the size constraints or stores new ones.

ControlOrigin - top left pixel of this control

// standard properties, which should be supported by all descendants

Reads value for the Origin (top left pixel) of this control. (read-only)

ControlState - whether mouse has been clicked, data being read, control being re-drawn, etc

// standard properties, which should be supported by all descendants

ControlState - whether mouse has been clicked, data being read, control being re-drawn, etc. Reads or stores the state of the control.

ControlStyle - whether the control responds to mouse clicks, can be re-sized, has particular actions, etc

// standard properties, which should be supported by all descendants

ControlStyle - whether the control responds to mouse clicks, can be re-sized, has particular actions, etc. Reads the stored style, or saves the new style

Whether the control is Enabled. If not, it usually appears 'greyed-out'

// standard properties, which should be supported by all descendants

Whether the control is Enabled. If not, it usually appears 'greyed-out'

Reads a flag to see whether the control is enabled, or stores a new value. If stored, sets a flag to say so.

The Font to be used for text in this control

// standard properties, which should be supported by all descendants

Reads a flag to see what font should be used, or sets a flag to store it. If stored, sets a flag to say so

The properties of Font are defined in the parent class TFont

Reads or writes a flag to deterine whether this object is actually a control // standard properties, which should be supported by all descendants
Reads a logical (boolean) flag or sets it to determine whether this object is a control.
Reads a flag to determine whether the mouse entered the control // standard properties, which should be supported by all descendants
Reads logical (boolean) flag to see whether mouse has entered the control
Event handler for a change in bounds of the control

// standard properties, which should be supported by all descendants

Reads or Writes flag if bounds are changed

Event Handler for mouse click

// standard properties, which should be supported by all descendants

This is often the default action for many controls, and is often the ONLY action specified by the programmer. The action can be spcified by the user, either by typing explicit code into the implementation section for this control, or by selecting an action from a pre-supplied ActionList

Reads or writes a flag if a mouse click is detected, and sets a flag if a value is stored.

Event Handler for resize of control // standard properties, which should be supported by all descendants
Reads or Writes flag if control is re-sized.
Event Handler when a hint needs to be shown // standard properties, which should be supported by all descendants
Reads or Writes a flag when a hint (a small pop-up box, appearing when the mouse hovers over an object) is to be shown
Determine what is the parent for this control // standard properties, which should be supported by all descendants
Reads or writes a flag to find or store the identity of the parent for this control. The parent is of type TWincontrol
PopupMenu - a context-sensitive menu that pops up when the right mouse button is clicked over this control // standard properties, which should be supported by all descendants
Reads the details of the pop-up menu, or stores them.
Properties are defined in the parent class TPopupMenu
Flag to determine: Is hint to be displayed for this control? // standard properties, which should be supported by all descendants
Reads flag or writes one to determine if a hint is to be shown when mouse hovers over this control. If value is stored, a storage flag is set. Display of the actual hint is controlled by OnShowHint
OnShowHint
Visible - can the control be seen?
The Visible property represents the ability to see a visual control. 
          If Visible is True the control is shown, otherwise it is hidden.
          Calling Show sets, among others, Visible to True.
          Setting Visible to False is equivalent to calling Hide method.
The Visible property does not depend on control's parent visibility. Use IsVisible method to consider this and get real visibility.
Reads or writes a message associated with this window // standard properties, which should be supported by all descendants
Reads message from flag area, or stores a message
Left - the coordinate of the left edge of the control Height - the vertical dimension of the control Hint - a small informative pop-up box that appears when the mouse 'hovers' over a control

Hint - a small informative pop-up box that appears when the mouse 'hovers' over a control

Requires ShowHint to be True

Top - the coordinates of the top edge of the control Width - the horizontal dimension of the control How Child controls are to be sized relative to parent { TControlChildSizing } { LeftRightSpacing, TopBottomSpacing: integer; minimum space between left client border and left most children. For example: ClientLeftRight=5 means child's Left position is at least 5. HorizontalSpacing, VerticalSpacing: integer; minimum space between each child horizontally } { Defines how child controls are resized/aligned. cesAnchorAligning, cssAnchorAligning Anchors and Align work like Delphi. For example if Anchors property of the control is [akLeft], it means fixed distance between left border of parent's client area. [akRight] means fixed distance between right border of the control and the right border of the parent's client area. When the parent is resized the child is moved to keep the distance. [akLeft,akRight] means fixed distance to left border and fixed distance to right border. When the parent is resized, the controls width is changed (resized) to keep the left and right distance. Same for akTop,akBottom. Align=alLeft for a control means set Left leftmost, Top topmost and maximize Height. The width is kept, if akRight is not set. If akRight is set in the Anchors property, then the right distance is kept and the control's width is resized. If there several controls with Align=alLeft, they will not overlapp and be put side by side. Same for alRight, alTop, alBottom. (Always expand 3 sides). Align=alClient. The control will fill the whole remaining space. Setting two children to Align=alClient does only make sense, if you set maximum Constraints. Order: First all alTop children are resized, then alBottom, then alLeft, then alRight and finally alClient. cesScaleChilds, cssScaleChilds Scale children, keep space between them fixed. Children are resized to their normal/advised size. If there is some space left in the client area of the parent, then the children are scaled to fill the space. You can set maximum Constraints. Then the other children are scaled more. For example: 3 child controls A, B, C with A.Width=10, B.Width=20 and C.Width=30 (total=60). If the Parent's client area has a ClientWidth of 120, then the children are scaled with Factor 2. If B has a maximum constraint width of 30, then first the children will be scaled with 1.5 (A.Width=15, B.Width=30, C.Width=45). Then A and C (15+45=60 and 30 pixel space left) will be scaled by 1.5 again, to a final result of: A.Width=23, B.Width=30, C.Width=67 (23+30+67=120). cesHomogenousChildGrowth, cssHomogenousChildDecrease Enlarge children equally. Children are resized to their normal/advised size. If there is some space left in the client area of the parent, then the remaining space is distributed equally to each child. For example: 3 child controls A, B, C with A.Width=10, B.Width=20 and C.Width=30 (total=60). If the Parent's client area has a ClientWidth of 120, then 60/3=20 is added to each Child. If B has a maximum constraint width of 30, then first 10 is added to all childs (A.Width=20, B.Width=30, C.Width=40). Then A and C (20+40=60 and 30 pixel space left) will get 30/2=15 additional, resulting in: A.Width=35, B.Width=30, C.Width=55 (35+30+55=120). cesHomogenousSpaceGrowth Enlarge space between children equally. Children are resized to their normal/advised size. If there is some space left in the client area of the parent, then the space between the children is expanded. For example: 3 child controls A, B, C with A.Width=10, B.Width=20 and C.Width=30 (total=60). If the Parent's client area has a ClientWidth of 120, then there will be 60/2=30 space between A and B and between B and C. } The base class for all windowed controls Defines many of the properties inherited by child classes,
particularly those related to size, position, bounds, docking,
the responses to mouse movements and key presses.
Defines procedures and functions related to windowed controls,
some of which override virtual methods defined in ancestor classes.
BorderStyle - none, or single Property to determine width of the window's border // properties which are supported by all descendants

Either reads a flag to find the width or sets the width.
Default is set to zero.
Finds how many of the Bounds are locked // properties which are supported by all descendants Find which type of brush to use for drawing the control // properties which are supported by all descendants Stored value of client height Read value fom flag Stored value of Client Width Reads value from flag Definitions of how any child control is to be sized Reads values from flag or stores values to flag. Most of the properties are inherited from TControlChildSizing,
which you should read to find out more about this control
The number of controls associated with this window // properties which are supported by all descendants
Reads value from flag
Finds which controls are located in this window // properties which are supported by all descendants
Reads values from a flag; Index is a number signifying which control, from a list
Numerical value to identify the control within the window The default procedure to be associated with the window // properties which are supported by all descendants
reads or writes a flag to define what is the default procedure
The number of clients to which this control is docked Reads count from flag The dock clients of this window Reads a flag to find the actual dock client controls The serial numbers (Index) of the dock clients Property that actually controls the docking process Reads or writes a flag. Derived from the parent class TDockManager Is this a dock site? Default false Reads or sets a flag to show whether this is a dock site. Default false Are the contents of this window to be double buffered? Reads or writes flag to determine whether double buffering is to be used Handle for identifying and manipulating this window Reads from or writes handle to flag Is the window being re-sized? Reads or writes flag to indicate re-sizing The place this control occupies in the list of tabs Reads or writes information in flag; default is -1 TabStop - determines if the user can tab to a control.

Reads or writes boolean flag; default is False

Use the TabStop to allow or disallow access to the control using the Tab key.

If TabStop is True, the control is in the tab order. If TabStop is False, the control is not in the tab order and the user can't use the Tab key to move to the control.

OnEnter - event handler for when the mouse enters the control, and the control receives focus OnExit - event handler for when the mouse leaves the control and it loses focus OnKeyDown - event handler for instance when key is down while control has focus

OnKeyDown - event handler for instance when key is down while control has focus

Differs from OnKeyPress in that the key may have already been down when the control received focus; with OnKeyPress the key needs to become pressed while the control has focus.

OnKeyPress - event controller for a key being pressed while the control has focus

OnKeyPress - event controller for a key being pressed while the control has focus

Differs from OnKeyDown in that the key needs to become pressed while the control has focus; with OnKeyDown the key may have already been down when the control received focus.

OnKeyUp - event handler for instance when a key is up (not pressed) while the control has focus

OnKeyUp - event handler for instance when a key is up (not pressed) while the control has focus

The key may already have been up when the control received focus, or a pressed key may become released during the time the control has focus.

OnUnDock - event handler for control becoming disconnected (undocked) from parent Create a new instance of the Window Control Destroy this instance of the Window Control, and return the resources used TGraphicControl is the base class for all lightweight controls.

TGraphicControl supports simple lightweight controls that do not need the ability to accept keyboard input or contain other controls.

Since lightweight controls do not wrap GUI screen objects, they are faster and use fewer resources than controls based on TWinControl.

TGraphicControl provides a Canvas property for access to the control's drawing surface and a virtual Paint method called in response to paint requests received by the parent control.

A reference to the parent's Canvas. The canvas isn't "owned" by the TGraphicControl, but by its parent. Virtual Paint method called in response to paint requests. Virtual Paint method called in response to paint requests received by the parent control. Create a new instance of a Graphic Control Destroy this instance of a graphic control and return its resources A clipping window to the parent canvas.

The TGraphicsControl.Canvas is a clipping window to the parent canvas.

If you ask for the Canvas.Width or Canvas.Height, you are actually getting the parent control's Canvas dimensions.

To get the dimensions of the TGraphicControl, you must query the ClientRect.

OnPaint - event handler for request to paint canvas TCustomControl - a base class for many window controls Contains simple basic definitions to create, destroy and paint window controls and set basic properties like canvas and border Paint handler plug-in This is a plug-in in TWinControl to get the DC,
assign it to our canvas and call the paint method for
descendants to do the actual painting
The Device Context in which to paint Create an instance of this control Owner, ie the component that called this control Destroy the control and returns its resources If the custom control has been destroyed, free its handle as well The default paint handler for the class If using a control derived from this parent, the developer needs to write a specific paint handler to override this one The area of a control on which its components are drawn or painted The Canvas is the area of screen on which the various components are drawn.
This inherits its properties from TCanvas,
and that description should be read to understand their definitions more fully.
The available border styles for this sort of control Only a restricted series of options is available: none or a single border. Event handler for painting TDockZone is a node in the TDockTree and encapsulates a region into which other zones or a single control are contained. This is an ancestor class for TDockTree, in the sense that it forms the elementary component of which the tree is constructed Create this instance of Dock Zone Specifies the tree to which this zone belongs, and and child zones which it contains The dock tree to which this zone belongs A tree of dock zones - every docked window has one tree
TDockTree - a tree of TDockZones - Every docked window has one tree

  
    This is an abstract class. The real implementation is in ldocktree.pas.

    Docking means here: Combining several windows to one. A window can here be
    a TCustomForm or a floating control (undocked) or a TDockForm.
    A window can be docked to another to the left, right, top, bottom or "into".
    The docking source window will be resized, to fit to the docking target
    window.

    Example1: Docking "A" (source window) left to "B" (target window)
    
       +---+    +----+
       | A | -> | B  |
       +---+    |    |
                +----+
      Result: A new docktree will be created. Height of "A" will be resized to
              the height of "B".
              A splitter will be inserted between "A" and "B".
              And all three are children of the newly created TLazDockForm of the
              newly created TDockTree.
      
       +------------+
       |+---+|+----+|
       || A ||| B  ||
       ||   |||    ||
       |+---+|+----+|
       +------------+

      If "A" or "B" were floating controls, the floating dock sites are freed.
      If "A" or "B" were forms, their decorations (title bars and borders) are
      replaced by docked decorations.
      If "A" had a TDockTree, it is freed and its child dockzones are merged to
      the docktree of "B". Analog for docking "C" left to "A":
      
       +------------------+
       |+---+|+---+|+----+|
       || C ||| A ||| B  ||
       ||   |||   |||    ||
       |+---+|+---+|+----+|
       +------------------+
       

      
    Example2: Docking A into B
                +-----+
       +---+    |     |
       | A | ---+-> B |
       +---+    |     |
                +-----+

      Result: A new docktree will be created. "A" will be resized to the size
              of "B". Both will be put into a TLazDockPages control which is the
              child of the newly created TDockTree.
              
       +-------+
       |[B][A] |
       |+-----+|
       ||     ||
       || A   ||
       ||     ||
       |+-----+|
       +-------+

    Every DockZone has siblings and children. Siblings can either be
    - horizontally (left to right, splitter),
    - vertically (top to bottom, splitter)
    - or upon each other (as pages, left to right).


    InsertControl - undock control and dock it into the manager. For example
                    dock Form1 left to a Form2:
                    InsertControl(Form1,alLeft,Form2);
                    To dock "into", into a TDockPage, use Align=alNone.
    PositionDockRect - calculates where a control would be placed, if it would
                       be docked via InsertControl.
    RemoveControl - removes a control from the dock manager.

    GetControlBounds - TODO for Delphi compatibility
    ResetBounds - TODO for Delphi compatibility
    SetReplacingControl - TODO for Delphi compatibility
    PaintSite - TODO for Delphi compatibility

Update the entries in the tree (increment the update count) Create a new instance of a docking tree The window control that is to be the site for docking Remove this instance of dock tree, and free its resources Some properties of the current Mouse Contains information about current mouse position, whether it has captured an object, whether it is dragging the object, and how far the mouse is allowed to move before the captured object is made to move. Create an instance of the Mouse object Destroy this instance of the mouse object Can be a locally defined method to override the method specified by the parent object System handle for the captured object Reads or writes a system variable identifying the captured object The screen position of the cursor Reads or writes a variable to determine the position of the cursor (a point with X, Y co-ordinates) Does the object get dragged as soon as the mouse moves? Reads or writes a flag to determine whether to move the object immediately the mouse moves: default is true The least distance the mouse must move before the captured object is moved Reads or writes a flag to deterine the threshold movement (if DragImmediate was false). Default is 5 pixels the strings that appear, eg in the Object Inspector, to describe the possible types of alignments Find the Handle for the specified Control

FindControl

Returns the TWinControl associated with the Handle.

This is very interface specific. Better use FindOwnerControl.

Handle can also be a child handle, and does not need to be the Handle property of the Result.

IMPORTANT: So, in most cases: Result.Handle <> Handle in the params.

Find the Handle for the specified Owner Control

FindOwnerControl

Returns the TWinControl owning the Handle. Handle can also be a child handle,

and does not need to be the Handle property of the Result.

IMPORTANT: Therefore, in most cases: parameter Handle <> Result.Handle

Returns a string for the name of the cursor as identified by an integer constant Calls CursorToIdent to find correct entry in look-up table Returns a string with the name of the cursor type corresponding to the integer constant Uses look-up table to find cursor identifier corresponding to integer cursor constant Returns true if a valid entry is found in the look-up table Adjust space round border of this control

RemainingClientRect: remaining clientrect without CurBorderSpace

CurBorderSpace: current borderspace around RemainingClientRect

Left, Top, Right, Bottom: apply these borderspaces to CurBorderSpace

CurBorderSpace will be set to the maximum of CurBorderSpace and Left, Top, Right, Bottom.

RemainingClientRect will shrink.

RemainingClientRect will not shrink to negative size.

Register the components used in the current application, so that they can be recognised TControlBiDiMode - enabling bi-directional writing Allows Languages such as Arabic and Hebrew to be used ParentBiDiMode - does the control follow the BiDiMode settings of its parent?