Several standard controls used in most Lazarus forms Determines the case of text displayed in the edit box or combobox. Normal mode - Character case according to what the user types. Converts every character that the user types into upper case characters. Converts every character that the user types into lower case characters. TEchoMode: Determines how strings in the edit box are displayed. The scroll action type. Scroll one line up. Scroll one line down. Scroll one page up. Scroll one page down. Scroll to the specified position. Scroll tracking to the specified position. Scroll to the top. Scroll to the bottom. Scroll ends. The scroll event. Determines the scroll action. Contains the current scroll position. TCustomScrollBar : the base class for TScrollBar Create Parameters for the scroll bar The paramaeter list Create a window for the control Change the scroll Bar The scrolling process The code used for scrolling - up or down a line, a page, to the top or bottom etc The position of the scrolling device Create a new instance of the Window Control Defines the Max and Min values, the size of the page and the position of the scroller Kind of scroll bar - whether Horizontal or Vertical LargeChange - the size of the step to be taken by the slider for a large change A LargeChange is produced by the user clicking on the blank area above or below the slider; it is rather analogous to the Page Down or Page Up functions of the Keyboard and is typically set up to move the slider and the contents of the page or canvas by a whole paragraph or half a page or a full page. The maximum value (for bottom of the scroll bar or the right-most extent) the minimum value, for the top of the scroll bar or its left-most extent PageSize: the size of a page - typically used for LargeChange The Position of the scroller along the ScrollBar SmallChange - the size of the step to be taken by the scroller for a small change A small change is produced by the user clicking on one of the triangular tags at either end of the scrollbar. It is rather analogous to the effect of using the up or down arrows on the keyboard, and is typically set to produce a movement of a few pixels or a single line of text Whether the scrollbar can be reached by use of the Tab key - default is True Event handler for any change in position of the slider or other mouse movement or keyboard event associated with the scrollbar OnScroll - Handler for a scrolling event (by mouse, keyboard or program)

OnScroll - Handler for a scrolling event

Called when there is any movement of the slider by mouse, arrow keys or Page Up/Down keys, or if the display in the main window is caused to scroll

TScrollBar - a control that allows the user to scroll the current page or document window by moving a slider

TScrollBar - a control that allows the user to scroll the current page or document window by moving a slider

It appears as a long rectangular track or bar within which a smaller contrasting block or slider can move up and down (or from side to side in a horizontal ScrollBar)

It has small triangular indicators or pointers at each end. Typically, for a vertical ScrollBar the top indicator points up, and at the bottom there is a pair of pointers, one up and one down. Clicking with the mouse on one of the pointers moves the slider a small distance (SmallChange) in the specified direction, and the programmer's responsibility is to ensure that the page, image or document in which the ScrollBar is found will scroll by a corresponding small amount

Clicking with the mouse in the blank area of the scrollbar above or below the slider makes the slider move by a larger increment (LargeChange) and scrolls the contents of the window by a larger amount - several lines, a paragraph, half a page or anything up to a page (PageSize)

The slider can also be moved by clicking on it with the mouse, and holding down the button while moving the mouse. The slider follows the mouse until the button is released. If the mouse has a scrollwheel, the slider can be similarly moved by rotating the wheel. In each case, the contents of the window scroll by a corresponding amount

Scrolling of the window and movement of the slider can also be achieved by using the directional arrows or the Page Up/Page Down keys on the keyboard

The location of the slider along the track is held in the Position property, which reports where the mouse has placed it, or can alternatively be set to an arbitrary location by the program. If the mouse or arrow keys are used to move the cursor somewhere on the main window so as to make the display scroll (eg by moving beyond the top or bottom line in a text display) the scroll bar slider moves to indicate the corresponding location along the scroll bar

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

BiDiMode - enabling bi-directional writing Allows Languages such as Arabic and Hebrew to be used 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

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.

DragCursor - the style of cursor to be used during the Drag process DragMode - whether manual or automatic 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.

Kind of scroll bar - whether Horizontal or Vertical LargeChange - the size of the step to be taken by the slider for a large change A LargeChange is produced by the user clicking on the blank area above or below the slider; it is rather analogous to the Page Down or Page Up functions of the Keyboard and is typically set up to move the slider and the contents of the page or canvas by a whole paragraph or half a page or a full page. The maximum value (for bottom of the scroll bar or the right-most extent) the minimum value, for the top of the scroll bar or its left-most extent PageSize: the size of a page - typically used for LargeChange ParentBiDiMode - does the control follow the BiDiMode settings of its parent? ParentShowHint - does the control adopt the same hinting behaviour as its parent? Default is true 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
The Position of the scroller along the ScrollBar SmallChange - the size of the step to be taken by the scroller for a small change A small change is produced by the user clicking on one of the triangular tags at either end of the scrollbar. It is rather analogous to the effect of using the up or down arrows on the keyboard, and is typically set to produce a movement of a few pixels or a single line of text The place this control occupies in the list of tabs Reads or writes information in flag; default is -1 Whether the scrollbar can be reached by use of the Tab key - default is True 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.
Event handler for any change in position of the slider or other mouse movement or keyboard event associated with the scrollbar Event handler for the Drag-Drop manoeuvre Event handler for the end of a dragging process 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.

OnScroll - Handler for a scrolling event (by mouse, keyboard or program)

OnScroll - Handler for a scrolling event

Called when there is any movement of the slider by mouse, arrow keys or Page Up/Down keys, or if the display in the main window is caused to scroll

Event handler for start of dragging process TCustomGroupBox - the base class for TGroupBox, TRadioGroup and TCheckGroup GetControlClassDefaultSize - finds out default size for the class TGroupBox - a container that allows a number of objects to be grouped physically and conceptually on the form

Group Box. Allows a number of objects to be grouped physically and conceptually on the form; they can be moved around together and have certain properties in common.

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

BiDiMode - enabling bi-directional writing Allows Languages such as Arabic and Hebrew to be used 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

Caption - the text-string appearing on the Control, usually used to identify its function 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
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

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.

Is this a dock site? Default false Reads or sets a flag to show whether this is a dock site. Default false DragCursor - the style of cursor to be used during the Drag process DragKind - what sort of dragging? Drag or Dock DragMode - whether manual or automatic 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

ParentBiDiMode - does the control follow the BiDiMode settings of its parent? ParentColor - should the control have the same colour as the parent? Default is true ParentFont - should the control use the same font as the parent? Default is true ParentShowHint - does the control adopt the same hinting behaviour as its parent? Default is true 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
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.

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.
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 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 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 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.

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 resize of control // standard properties, which should be supported by all descendants
Reads or Writes flag if control is re-sized.
Event handler for the start of a docking manoeuvre Event handler for start of dragging process OnUnDock - event handler for control becoming disconnected (undocked) from parent Defines the behavior of the AutoComplete feature in a combobox control.

TComboBoxAutoCompleteTextOption defines the behavior of the AutoComplete feature.

  • cbactEnabled: Enable Auto-Completion feature.
  • cbactEndOfLineComplete: Perform Auto-Complete only when cursor is at the end of the string.
  • cbactRetainPrefixCase: Retains the case of characters user has typed. (This option has no effect if cbactEndOfLineComplete is False)
  • cbactSearchCaseSensitive: Search completion string with case sensitivity.
  • cbactSearchAscending: Search completion string in accending order. (False will search in descending order)
Set of TComboBoxAutoCompleteTextOption ComboBox Style ComboBox Style: may be Simple, a single-line Drop-Down or a Drop-Down list, or some version drawn by the Owner TCustomComboBox - the base class from which TComboBox is derived

TCustomComboBox - the base class from which TComboBox is derived

Despite similarities in appearance to TCustomEdit and TCustomList , the class inherits no properties from these classes, but only from TWinControl

It has some interesting properties including AutoComplete and AutoCompleteText, AutoDropDown and the ability to create and add a History display

FCharCase: TEditCharCase FAutoCompleteText: TComboBoxAutoCompleteText Private variable of property AutoCompleteText. Options for behavior of the Auto-Complete feature. FAutoSelect: Boolean

Private variable for property AutoSelect. When True, the edit control will select all its text when:

  • It receives focus
  • The Enter key is pressed.
  • A new item is selected.
FAutoSelected: Boolean Private variable for property AutoSelected. True indicate that the edit or combobox control has just performed an AutoSelect operation so that subsequent mouse-clicks and keystrokes proceed normally without selecting the text. False is set when the edit or combobox control loses focus. Combo Box Initialise the window for this control Destroy the window for this control DropDownCount - number of entries in the drop-down list ItemHeight - the height of the current item in the drop-down list ItemWidth - the width of the current item in the drop-down list MaxLength - the maximum allowed length of a string OnChange - event handler for any change in properties of the combo box OnCloseUp - event handler for when the drop-down box is closed up again OnDrawItem - event handler for when an entry is written to the Items list OnDropDown - event handler for when the drop-down list appears Event handler when measurement of an item is required Event handler when this control is selected Is the colour of the parent control to be used (default false)? Sorted - whether the entries in the drop-down list have been sorted Create a new instance of the Window Control Destroy this instance of the Window Control, and return the resources used AddItem - adds an Item to the list in the drop-down box AddHistoryItem - Add an Item as first entry in History List

AddHistoryItem - Add an Item as first entry in History List

Removes the Item from old position and removes last item if history is full

The item to be addd to the list The maximum number of items that can be added to the history Whether the item is to be set as text Whether the item is added in a case sensitive manner (eg determines how they are sorted) The history item to be added, expressed as an object Clear - remove all text and drop-down list ClearSelection - clear the currently selected text or items from drop-down list CharCase: indicates whether text is to be displayed as Upper, Lower or Normal case (as entered)

Indicates how text is displayed in a text editing control in the following ways:

  • Normal case letters
  • Upper case letters
  • Lower case letters
DroppedDown - indicates whether or not the drop-down list has appeared Measure the size (Height) of an item in the drop-down list The index number of the item whose height is to be measured The height as measured by the procedure Select all items in the list AutoComplete - enables the facility to offer suggestions for completing text-strings AutoCompleteText : Options for behavior of the Auto-Complete feature

AutoCompleteText : Options for behavior of the Auto-Complete feature

  • Enabled: Enable Auto-Completion feature.
  • EndOfLineComplete: Perform Auto-Complete only when cursor is at the end of the string.
  • RetainPrefixCase: Retains the case of characters user has typed. (This option has no effect if cbactEndOfLineComplete is False)
  • SearchCaseSensitive: Search completion string with case sensitivity.
  • cbactSearchAscending: Search completion string in accending order. (False will search in descending order)

This property exists as a Set of Options, so zero or more options may be operational

AutoDropDown - if True, the drop-down list appears as soon as the cursor moves over the text box

AutoDropDown - if True, the drop-down list appears as soon as the cursor moves over the text box

If False, the drop-down box only appears when the downward triangular indicator at the end of the box is selected

AutoSelect : Boolean. If True, all contents of Text box are selected when control receives focus

When True, the edit control will select all its text when:

  • It receives focus
  • The Enter key is pressed.
  • A new item is selected.
AutoSelected : True indicates that the combobox control has just performed an AutoSelect operation

True indicates that the combobox control has just performed an AutoSelect operation so that subsequent mouse-clicks and keystrokes proceed normally without selecting the text.

False is set when the combobox control loses focus.

ArrowKeysTraverseList - enables the operator to use the keyboard Arrow keys to move through the list as an alternative to using the mouse Canvas - the area on which the components are drawn or painted Items - an array of strings that holds the entries of the drop-down list Index - the number of the currently selected item (starting at zero)

Index - the number of the currently selected item

The first item has number 0, the second has number 1, the third number 2, etc.

In case no item is selected, ItemIndex has value -1.

ReadOnly - if True, information in the control can only be Read, not Written or Deleted SelLength - the length of the text that has been selected SelStart - the starting position of the text that has been selected SelText - the text string that has been selected for editing Style : may be Simple, a single-line Drop-Down or a Drop-Down list, or some version drawn by the Owner Text - the string appearing in the main box. If an item on the drop-down list is selected, it replaces the contents of Text 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.

TComboBox - a simple combination of text box for free text entry, and a drop-down list allowing one of several options to be chosen.

TComboBox - a simple combination of text box for free text entry, and a drop-down list allowing one of several options to be chosen.

The default text-string (if any, entered in the Form Designer) and the value of the text string that is ultimately selected from the drop-down list, is held in Text

The values that can be selected from the drop-down list are held in the string-array Items. Clicking on the ellipsis (...) next to Items in the Object Inspector opens a pop-up string-list editor which allows the designer to enter and edit a number of lines of text to represent the selections

At run-time, the entry selected from the drop-down list in Items is used to replace any information previously found in Text, and ItemIndex holds the (zero-origin) index number of the selected item

If no value is selected from the drop-down list, the default text (if any) remains, or any information typed directly into Text will be returned, and ItemIndex takes the value of -1

Used to align the control in one of four directions. Align the Control with other Controls in its vicinity The set of anchor definitions for this control Anchors - enables the operator to use the keyboard Arrow keys to move through the list as an alternative to using the mouse - enables the facility to offer suggestions for completing text-strings : Options for behavior of the Auto-Complete feature - if True, the drop-down list appears as soon as the cursor moves over the text box : Boolean. If True, all contents of box are selected when control receives focus 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

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.

BiDiMode - enabling bi-directional writing Allows Languages such as Arabic and Hebrew to be used 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

CharCase: indicates whether text is to be displayed as Upper, Lower or Normal case (as entered)

Indicates how text is displayed in a text editing control in the following ways:

  • Normal case letters
  • Upper case letters
  • Lower case letters
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.

DragCursor - the style of cursor to be used during the Drag process DragMode - whether manual or automatic DropDownCount - number of entries in the drop-down list 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

ItemHeight - the height of the current item in the drop-down list Index - the number of the currently selected item (starting at zero)

Index - the number of the currently selected item

The first item has number 0, the second has number 1, the third number 2, etc.

In case no item is selected, ItemIndex has value -1.

Items - an array of strings that holds the entries of the drop-down list ItemWidth - the width of the current item in the drop-down list MaxLength - the maximum allowed length of a string OnChange - event handler for any change in properties of the combo box 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.

OnCloseUp - event handler for when the drop-down box is closed up again 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 the Drag-Drop manoeuvre Event handler for the case when a control is dragged over another control OnDrawItem - event handler for when an entry is written to the Items list Event handler for the end of a dragging process OnDropDown - event handler for when the drop-down list appears Event handler when editing is done 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.

Event handler when measurement of an item is required 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 start of dragging process Event handler when this control is selected ParentBiDiMode - does the control follow the BiDiMode settings of its parent? ParentColor - should the control have the same colour as the parent? Default is true ParentFont - should the control use the same font as the parent? Default is true ParentShowHint - does the control adopt the same hinting behaviour as its parent? Default is true 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
ReadOnly - if True, information in the control can only be Read, not Written or Deleted 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
Sorted - whether the entries in the drop-down list have been sorted Style : may be Simple, a single-line Drop-Down or a Drop-Down list, or some version drawn by the Owner 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.

Text - the string appearing in the main box. If an item on the drop-down list is selected, it replaces the contents of Text 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.
TCustomList Box : the base class for TListBox Clear the selected items Event handler when an item requires to be measured Create a new instance of the Window Control Destroy this instance of the Window Control, and return the resources used Find the index at the Y coordinate The integer value of the Y coordinate Get the selected text string Returns the index value of the item at the specified position Returns the coordinates of the rectangle in which the item lies Is the item with the specified index visible? Is the item with the specified index fully visible (or is part of it outside the bounds of the visible window)? Measure the height of the item in the list with the specified index The index value of the item to be measured The height of the item as measured by the procedure Clear the listbox - both the edit box and the drop-down list Lock ( make permanent) the change in the selection Unlock the previously locked change in selection Procedure to emulate the onClick event handler 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

BorderStyle - none, or single Canvas - defines the area on which all graphic material is drawn Performs Click procedure when the selection is changed (which usually puts the selected item into the edit box) Columns - the number of vertical columns in which the Items are arranged 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.

Count - the number of entries in the list of Items ExtendedSelect - boolean. Whether extended selection is allowed. Default True 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

not implemented ItemHeight - the height of the individual Items ItemIndex: Integer to indicate the currently selected item (zero origin) Indicates the currently selected item. The first item has number 0, the second has number 1, the third number 2, etc. In case no item is selected, ItemIndex has value -1. If MultiSelect is True, ItemIndex represents the item which has focus, which typically has a different color from the other items. Items - an array of strings representing the list of entries MultiSelect - allows more than one Item from the list to be selected at a time, by pressing the CTRL or SHIFT key while selecting 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 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.

OnDrawItem - event handler for drawing an Item

OnDrawItem - event handler for drawing an Item

For example, selecting an item may require it to be highlighted or have its font or background changed

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.

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 OnMouseWheel - event handler for movement of the scroll-wheel on the mouse OnMouseWheelDown - event handler for downwards scrolling movement of the mouse wheel OnMouseWheelUp - event handler for upward scrolling movement of the mouse wheel Event Handler for resize of control // standard properties, which should be supported by all descendants
Reads or Writes flag if control is re-sized.
OnSelectionChange - event handler for changing the Item selected ParentFont - should the control use the same font as the parent? Default is true ParentShowHint - does the control adopt the same hinting behaviour as its parent? Default is true 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
The number of selected iems in the drop-down list Selected - whether the Item with given Index has been selected 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
Sorted - whether the selected Items in the list have been arranged in alphabetical order Style of List Box - normal, owner-draw fixed, or owner-draw variable 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.

Topindex - the highest value of Index in this list 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.
TListBox : a simple string list from which a choice is made

TListBox : a simple string list from which a choice is made

The array of strings is held in Items

Clicking on the ellipsis (...) next to the Items entry in the Object Inspector at design-time opens a string-list editor in which the individual text-strings for the list can be entered or edited. The editor also allows the entries to be sorted alphabetically in normal or reverse order.

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

TControlBiDiMode - enabling bi-directional writing Allows Languages such as Arabic and Hebrew to be used 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

BorderStyle - none, or single Performs Click procedure when the selection is changed (which usually puts the selected item into the edit box) 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.

Columns - the number of vertical columns in which the Items are arranged 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.

DragCursor - the style of cursor to be used during the Drag process DragMode - whether manual or automatic ExtendedSelect - boolean. Whether extended selection is allowed. Default True 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

not implemented Items - an array of strings representing the list of entries ItemHeight - the height of the individual Items MultiSelect - allows more than one Item from the list to be selected at a time, by pressing the CTRL or SHIFT key while selecting 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 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 the Drag-Drop manoeuvre Event handler for the case when a control is dragged over another control OnDrawItem - event handler for drawing an Item

OnDrawItem - event handler for drawing an Item

For example, selecting an item may require it to be highlighted or have its font or background changed

OnEnter - event handler for when the mouse enters the control, and the control receives focus Event handler for the end of a dragging process OnExit - event handler for when the mouse leaves the control and it loses 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.

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.

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.

Event handler for mouse movement within the current control Event handler for when a mouse button is pressed down 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 OnMouseWheel - event handler for movement of the scroll-wheel on the mouse OnMouseWheelDown - event handler for downwards scrolling movement of the mouse wheel OnMouseWheelUp - event handler for upward scrolling movement of the mouse wheel Event Handler for resize of control // standard properties, which should be supported by all descendants
Reads or Writes flag if control is re-sized.
OnSelectionChange - event handler for changing the Item selected 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
Event handler for start of dragging process ParentBiDiMode - does the control follow the BiDiMode settings of its parent? ParentShowHint - does the control adopt the same hinting behaviour as its parent? Default is true ParentFont - should the control use the same font as the parent? Default is true 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
Sorted - whether the selected Items in the list have been arranged in alphabetical order Style of List Box - normal, owner-draw fixed, or owner-draw variable 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.

Topindex - the highest value of Index in this list 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.
TCustomEdit : the base type from which the TEdit Box is derived.

TCustomEdit : the base type from which the TEdit Box is derived.

This control deals, for example, with issues such as selection of text sub-strings within the whole text string which are to be edited (cut, pasted, deleted, highlighted etc)

FAutoSelect: Boolean

Private variable for property AutoSelect.

When True, the edit control will select all its text when:

  • It receives focus
  • The Enter key is pressed.
  • A new item is selected.
FAutoSelected: Boolean Private variable for property AutoSelected. True indicate that the edit or combobox control has just performed an AutoSelect opertation so that subsequent mouse-clicks and keystrokes proceds normally without selecting the text. False is set when the edit or combobox control loses focus. FCharCase: TEditCharCase

Private variable for property CharCase. Indicates how text is displayed in a text editing control.

  • Normal case letters
  • Upper case letters
  • Lower case letters
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.

AutoSelect : if True, the edit control will select all its text when it receives focus or when the Enter key is pressed. AutoSelected : if True, indicates that the edit control has just performed an AutoSelect operation

If True, indicates that the edit control has just performed an AutoSelect operation so that subsequent mouse-clicks and keystrokes proceed normally without selecting the text.

False is set when the edit control loses focus.

Create a new instance of the Window Control Clear - delete all text SelectAll text, for example in order to copy or delete it ClearSelection - delete all characters in selected text CopyToClipboard - put a copy of the selection on the clipboard, while leaving the original text in place CutToClipboard - remove the selected text from its original location and put it on the clipboard PasteFromClipboard - put a copy of the clipboard contents at the current writing position BorderStyle - none, or single TEditCharCase - rules for what case to use (upper or lower) to display text

Indicates how text is displayed in a text editing control in the following ways:

  • Normal case letters
  • Upper case letters
  • Lower case letters

The rules can, of course, be overridden by use of the shift key.

EchoMode - how to echo keypresses on screen: normal (returning the actual character for that key), all upper or lower case, or a masking character as used in entering passwords MaxLength : maximum length allowed for text string Whether the text has been modified Modified: has the text been modified since creation? OnChange - event handler for any change in text PasswordChar : the character which appears in the Edit box replacing and masking the actual character typed

PasswordChar : the character which appears in the Edit box replacing and masking the actual character typed.

Typically used in password input, to prevent the typed characters from being seen by passers-by or casual observers (or even malicious observers!)

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
ReadOnly - the contents of the edit box may only be read, not written or erased SelLength : the length (in characters) of the text that has been selected for editing Sel Start: the index of the character from which selection (for editing) begins Sel Text : the string within the edit control that has been selected for editing 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.

Text : the character string contained in the Edit Box Text : the character string contained in the Edit Box TMemoScrollBar - a Scroll Bar specifically for use in Memo Boxes Scroll Bar specifically for use in Memo Boxes. Inherits most of its properties from its ancestor, TControlScrollBar GetHorzScrollBar - find the position and properties of the horizontal scroll bar GetVertScrollBar - find the position and properties of the vertical scroll bar The size of the scrolling increment The amount by which the scroll indicator moves if the triangle at either end of the bar is selected.
Read or write a flag to determine the increment, an integer with a default value of 8 (pixels)
The size of the paging increment for scrolling The amount by which the scroll indicator moves if the cursor selects the scroll bar above, below or on either side of the scroll indicator.
Reads or writes a flag to determine paging increment; default value is 80 pixels
Determine whether smooth scrolling is to be implemented Reads or writes a flag to determine smooth scrolling, and sets a flag is the scrolling status is stored Position of the scroll bar Reads or writes a flag with the position; default is zero The range (extent) of the scroll bar Reads or writes a flag to determine the range; default is zero Determine the size of the scroll bar Reads or writes a flag to determine the size; by default the size is not stored Is the scroll bar visible? Reads or writes flag to determine visibility, and sets a flag if the property is stored TCustomMemo : the base class for TMemo Create Create the Custom memo widget Destroy Destroy the CustomMemo widget when you have finished with it Append - procedure for adding a text string to the Memo Alignment - whether text is centered, left- or right-justified Lines : an array of strings (single lines of characters) which contains the text held or being entered in the Memo Lines : an array of strings (representing single lines of characters) which contains the textual material held or being entered in the Memo. The array is zero-indexed, ie the strings are numbered [0..numLines-1] The horizontal scroll bar for this memo The Vertical scroll bar for this memo Whether the Memo has ScrollBars - none, horizontal or vertical or both, or automatically placed if needed Whether Return characters are required to be included in the memo Whether Tab characters are required to be retained in the Memo Is WordWrap enabled, allowing long words to be carried on to the next line? Word Wrap: a logical flag to show whether or not word-wrap is enabled, ie if a word is close to the end of a line and is going to be too long for the line, it is wrapped down to the next line TEdit - an Edit Box: for entry or display of a single line of text. AutoSelected: if True, indicates that the edit control has just performed an AutoSelect operation

If True, indicates that the edit control has just performed an AutoSelect operation so that subsequent mouse-clicks and keystrokes proceed normally without selecting the text.

False is set when the edit control loses focus.

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

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

TControlBiDiMode - enabling bi-directional writing Allows Languages such as Arabic and Hebrew to be used 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

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.

TEditCharCase - rules for what case to use (upper or lower) to display text

Indicates how text is displayed in a text editing control in the following ways:

  • Normal case letters
  • Upper case letters
  • Lower case letters

The rules can, of course, be overridden by use of the shift key.

DragCursor - the style of cursor to be used during the Drag process DragMode - whether manual or automatic EchoMode - how to echo keypresses on screen: normal (returning the actual character for that key), all upper or lower case, or a masking character as used in entering passwords 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

MaxLength: maximum length allowed for text string ParentBiDiMode - does the control follow the BiDiMode settings of its parent? OnChange - event handler for any change in text 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 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 the Drag-Drop manoeuvre Event handler for the case when a control is dragged over another control Event handler when editing is done Event handler for the end of a dragging process 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.

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 resize of control // standard properties, which should be supported by all descendants
Reads or Writes flag if control is re-sized.
Event handler for start of dragging process ParentFont - should the control use the same font as the parent? Default is true ParentShowHint - does the control adopt the same hinting behaviour as its parent? Default is true PasswordChar: the character which appears in the Edit box replacing and masking the actual character typed

PasswordChar : the character which appears in the Edit box replacing and masking the actual character typed.

Typically used in password input, to prevent the typed characters from being seen by passers-by or casual observers (or even malicious observers!)

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
ReadOnly - the contents of the edit box may only be read, not written or erased 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
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.

The place this control occupies in the list of tabs Reads or writes information in flag; default is -1 Text: the character string contained in the Edit Box Text : the character string contained in the Edit Box 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.
TMemo - a box for entry or display of multiple lines of text

TMemo - a box for entry or display of multiple lines of text.

The textual data is held as an array of strings in Lines, where it can be edited

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

Alignment - whether text is centered, left- or right-justified 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

TControlBiDiMode - enabling bi-directional writing Allows Languages such as Arabic and Hebrew to be used 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

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.

DragCursor - the style of cursor to be used during the Drag process DragMode - whether manual or automatic 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

Lines : an array of strings (single lines of characters) which contains the text held or being entered in the Memo Lines : an array of strings (representing single lines of characters) which contains the textual material held or being entered in the Memo. The array is zero-indexed, ie the strings are numbered [0..numLines-1] MaxLength: maximum length allowed for text string ParentBiDiMode - does the control follow the BiDiMode settings of its parent? OnChange - event handler for any change in text 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 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 the Drag-Drop manoeuvre Event handler for the case when a control is dragged over another control Event handler when editing is done Event handler for the end of a dragging process 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.

Event handler for when a mouse button is pressed down Event handler for when the mouse button is released, ie "up" Event handler for mouse movement within the current control 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 start of dragging process ParentFont - should the control use the same font as the parent? Default is true 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
ReadOnly - the contents of the edit box may only be read, not written or erased Whether the Memo has ScrollBars - none, horizontal or vertical or both, or automatically placed if needed 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.

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.
Whether Return characters are required to be included in the memo Whether Tab characters are required to be retained in the Memo Is WordWrap enabled, allowing long words to be carried on to the next line? Word Wrap: a logical flag to show whether or not word-wrap is enabled, ie if a word is close to the end of a line and is going to be too long for the line, it is wrapped down to the next line TCustomStaticText : the base class for Static Text Create a new instance of the Window Control Alignment - whether text is centered, left- or right-justified BorderStyle - none, or single ShowAccelChar - underline the character in the static text that acts as an accelerator with a shortcut key

ShowAccelChar - underline the character in the static text that acts as an accelerator with a shortcut key

Boolean property - default True

TStaticText : a box to display a Constant Text String

TStaticText : a box to display a Constant Text String

Use this control to display a statement or comment that is not likely to change very often, or is not usually responsive to user actions

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

Alignment - whether text is centered, left- or right-justified 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

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

TControlBiDiMode - enabling bi-directional writing Allows Languages such as Arabic and Hebrew to be used 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

BorderStyle - none, or single 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.

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.

DragCursor - the style of cursor to be used during the Drag process DragMode - whether manual or automatic On Click - Action On Click - Action to be taken when the mouse button is clicked with the cursor over this control. User-defined Procedure On Double-click - Action On Double-click - Action to be taken when the mouse button is double-clicked while the cursor is over the control. User-defined Procedure On Mouse Down - Action On Mouse Down - Action to be taken when the mouse button is down while the cursor is over this control. User-defined Procedure On Mouse Entry - Action On Mouse Entry - Action to be taken when the mouse cursor enters the bounds of this control. User-defined Procedure On Mouse Leaving - Action On Mouse Leaving - Action to be taken when the mouse cursor leaves the boundaries of this control. User-defined Procedure. On Mouse Movement - Action On Mouse Movement - Action to be taken if the mouse cursor moves within the bounds of this control. User-defined Procedure On Mouse Up - Action On Mouse Up - Action to be taken if the mouse button is up while the cursor is over this control. On Resize - Action On Resize - Action to be taken when the control is resized. Might include re-alignment of text or selection of a different font size etc. User-defined Procedure Visible Visible - determines whether or not the control can be seen TButtonControl : ancestor class for several Button (including Radio Button) and Check Box classes Click - the procedure which allows programmatic simulation of a mouse click

Click - the procedure which allows programmatic simulation of a mouse click, and thus activation of the Action associated with the OnClick event

Called when the component has finished loading.

Loaded is called by the streaming system when a root component was completely read from a stream and all properties and references to other objects have been resolved by the streaming system. Descendents of TComponent should override this method to do some additional processing of properties after all published properties have been set from values obtained from the stream.

Application programmers should never call Loaded directly, this is done automatically by the streaming system.

Checked - whether this button has been checked, which signifies selection OnChange - event handler for any change in properties of the control Create a new instance of the Window Control TButtonActionLink - provides a link between a button and its corresponding action

TButtonActionLink - provides a link between a button and its corresponding action

This class provides very few properties of its own, but inherits a lot from its ancestors, TWinControlActionLink, TControlActionLink, TActionLink and TBasicActionLink

TCustomButton - the base class for TButton and TBitBtn Click - the procedure which allows programmatic simulation of a mouse click

Click - the procedure which allows programmatic simulation of a mouse click, and thus activation of the Action associated with the OnClick event

Creates a new instance of the TCustomButton class If you drop a component on the form editor you don´t need to add code to explicitly create it. The component is automatically created together with the the form, and destroyed when the form is destroyed. Performs the action associated with the button if it is the Default button Performs the action associated with the button if it is a Cancel button or if 'Escape' was pressed The active default control has changed to NewControl Update the roles for this form; see whether there have been any changes in its role Is this control Active - has it got Focus; is the mouse over it? Is this the Default button? (default setting is False)

Defines if a button is the Default on a form. That is, pressing ENTER will execute its onClick method, whether the control has focus or not!

Is a Modal Result awaited? (default is false) Is this the Cancel button? (default setting is False)

Setting this property to true, will have the effect that when the user hits ESC this button is Clicked, even if the button does not have focus. Usually the Button which reacts to ESC sets the ModalResult of the form to mrCancel.

What Colour is the button? (default is the same as all other button faces) Is the Button included in the TabStop list? (default setting is True) TButton: Base type for all Buttons. A push button control

TButton: Base type for all Buttons. A push button control.

The user pushes a button (eg selects it with the mouse cursor and clicks the mouse) to start an action.

Click, calling this method will invoke the OnClick event of the button If you want to programmatically Click on a button you can call its Click method. This will have the same effect as a user clicking on the button. 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

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

TControlBiDiMode - enabling bi-directional writing Allows Languages such as Arabic and Hebrew to be used 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

Is this the Cancel button? (default setting is False)

Setting this property to true, will have the effect that when the user hits ESC this button is Clicked, even if the button does not have focus. Usually the Button which reacts to ESC sets the ModalResult of the form to mrCancel.

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.

What Colour is the button? (default is the same as all other button faces) 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.

Is this the Default button? (default setting is False)

Defines if a button is the Default on a form. That is, pressing ENTER will execute its onClick method, whether the control has focus or not!

DragCursor - the style of cursor to be used during the Drag process DragMode - whether manual or automatic 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

ParentBiDiMode - does the control follow the BiDiMode settings of its parent? Is a Modal Result awaited? (default is false) 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

// 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 mouse 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 dragging process 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.

Event handler for when a mouse button is pressed down 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 mouse movement within the current control Event handler for when the mouse button is released, ie "up" 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 for start of dragging process ParentFont - should the control use the same font as the parent? Default is true ParentShowHint - does the control adopt the same hinting behaviour as its parent? Default is true 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
The place this control occupies in the list of tabs Reads or writes information in flag; default is -1 Is the Button included in the TabStop list? (default setting is True) 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.
Check Box State Check Box State: a set of constants defining the possible states of a Check Box - The check box has no check mark, indicating that the user has not selected the option. The check box has a check mark in it, indicating that the user has selected the option. The check box has a check mark in it, but it is grayed. TCustomCheckBox is the ancestor of all check-box components.

TCustomCheckBox : The base (abstract) class from which the TCheckBox is derived.

Check boxes present the user with options that can be selected (checked) or deselected (unchecked).

Click - the procedure which allows programmatic simulation of a mouse click

Click - the procedure which allows programmatic simulation of a mouse click, and thus activation of the Action associated with the OnClick event

Determines whether the check box can be in a "grayed" state.

If AllowGrayed is set to True, the check box has three possible states: checked, unchecked and grayed. If AllowGrayed is set to False, the check box has only two possible states: checked and unchecked.

Indicates whether the check box is checked (selected), unchecked (deselected) or grayed.

See TCheckBoxState for possible values of State.

Is the control in the sequence of controls accessed by successive presses of the Tab key? Use the TabStop to allow or disallow access to the control using the Tab key. If the 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 press the Tab key to move to the control. TCheckBox - a small box which can contain a check mark to indicate that it has been selected by a mouse click

TCheckBox : a small box which can contain a check mark to indicate that it has been selected by a mouse click. May be associated with a Caption that describes its function.

Checked - shows whether or not the box has been checked (ie selected) TToggle Box : a labelled box capable of being checked or unchecked

TToggle Box : a labelled box capable of being checked (when it becomes recessed) or unchecked (when it is raised).

The Application Programmer is responsible for ensuring that the OnClick event handler recognises the State of the box, takes the appropriate Action and places the State into the next appropriate value

Create a new instance of the Window Control Determines whether the check box can be in a "grayed" state.

If AllowGrayed is set to True, the check box has three possible states: checked, unchecked and grayed. If AllowGrayed is set to False, the check box has only two possible states: checked and unchecked.

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

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

TRadioButton : a button that works with other Radio Buttons in a mutually exclusive way - if one button is selected, none of the others in the group can be selected

TRadioButton : a button that works in conjunction with other Radio Buttons in a mutually exclusive manner - if one button of a group is selected, none of the others in that group can be selected.

The Application Programmer is responsible for ensuring that the OnClick event handler for each button has a unique Action, and that the Actions of the other (deselected and therefore inactive) buttons are turned off.

TRadioGroup behaves differently from a group of TRadioButton controls placed arbitrarily around a form.

In the case of TRadioButton, the mutual exclusivity is a feature that applies to any RadioButton anywhere in the Form, and the RadioButtons can be rearranged in any order or placed anywhere within the containing Form, while in TRadioGroup the exclusivity applies only to buttons within the Group, which are ordered strictly according to their ItemIndex within the Items stringlist.

TRadioButton is an entity in itself, with a number of additional properties, whereas the buttons within TRadioGroup are not separate entities, but rather are simply entries in a list of strings, each of which is associated with the on-screen image of a RadioButton.

The example shows the difference between the use of TRadioButton and TRadioGroup

TRadioGroup
TCustomLabel : the base type from which TLabel is derived. TCustomLabel : the base type from which TLabel is derived. Called when the component has finished loading.

Loaded is called by the streaming system when a root component was completely read from a stream and all properties and references to other objects have been resolved by the streaming system. Descendents of TComponent should override this method to do some additional processing of properties after all published properties have been set from values obtained from the stream.

Application programmers should never call Loaded directly, this is done automatically by the streaming system.

Alignment - whether text is centered, left- or right-justified FocusControl - whether this control has focus Layout - How the Text is to be laid out in the text rectangle: at the Bottom, Centre or Top ShowAccelChar - underline the character in the label that acts as an accelerator with a shortcut key

ShowAccelChar - underline the character in the label that acts as an accelerator with a shortcut key

Boolean property - default True

Transparent - whether the viewer can see through the control. Default True WordWrap - whether a word is to be wrapped to the next line if the text is about to become too long for the width available

WordWrap - whether a word is to be wrapped to the next line if the text is about to become too long for the width available

Boolean property, default False

OptimalFill - boolean. If True, font size is adjusted for optimal fill of available space Create a new instance of a Graphic Control Calculate the height of the font needed to fit the available space, given the MaxWidth and MaxHeight constraints Colour is stored If True, attempts to adjust font for an optimal fill of the space available Virtual Paint method called in response to paint requests. Virtual Paint method called in response to paint requests received by the parent control. 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

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.

TLabel : a brief text label to be placed in the Form near any object that needs to be identified. 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

Alignment - whether text is centered, left- or right-justified 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

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

TControlBiDiMode - enabling bi-directional writing Allows Languages such as Arabic and Hebrew to be used 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

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.

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.

DragCursor - the style of cursor to be used during the Drag process DragMode - whether manual or automatic 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.

FocusControl - whether this control has focus 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

Layout - How the Text is to be laid out in the text rectangle: at the Bottom, Centre or Top ParentBiDiMode - does the control follow the BiDiMode settings of its parent? ParentColor - should the control have the same colour as the parent? Default is true ParentFont - should the control use the same font as the parent? Default is true ParentShowHint - does the control adopt the same hinting behaviour as its parent? Default is true 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
ShowAccelChar - underline the character in the label that acts as an accelerator with a shortcut key

ShowAccelChar - underline the character in the label that acts as an accelerator with a shortcut key

Boolean property - default True

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
Transparent - whether the viewer can see through the control. Default True 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.
WordWrap - whether a word is to be wrapped to the next line if the text is about to become too long for the width available

WordWrap - whether a word is to be wrapped to the next line if the text is about to become too long for the width available

Boolean property, default False

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 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 the Drag-Drop manoeuvre Event handler for the case when a control is dragged over another control 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 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 resize of control // standard properties, which should be supported by all descendants
Reads or Writes flag if control is re-sized.
Event handler for start of dragging process OptimalFill - boolean. If True, font size is adjusted for optimal fill of available space How to use StdCtrls, ComCtrls or ExtCtrls

The Units StdCtrls, ComCtrls and ExtCtrls contain definitions and descriptions of many of the most commonly used controls for constructing Forms and other Objects in Lazarus Applications.

Many of the final target controls that the application developer wants to use, such as TButton, TMemo, TScrollBar etc, have a corresponding ancestor class such as TCustomButton, TCustomMemo or TCustomScrollBar. Several of the properties and methods relevant to the final target control are defined (and explained) more fully in the TCustomXXX class, and are inherited by the final target control.

If you drop a component on the form editor you don't need to add code explicitly to create it. The component is automatically created by the IDE together with the form, and destroyed when the form is destroyed.

However, if you create the component yourself by code don't forget to free it when it is no longer needed.

If you place a component on the Form Designer and look at the Object Inspector, you can observe the properties change as you move the component around.

For example, if you place a button (TButton) on the form, click on it to select it, then move it around the form with the mouse, you can watch the values of Top and Left change in the Object Inspector to reflect the new position. If you use the object's re-sizing bars to adjust its size, you can watch the Height and Width properties change as well.

On the other hand, by using the Object Inspector, you can select the value associated with a property such as height, and type in a new value; you can watch the size of the object on the form change to reflect the new value.

You can also explicitly change the properties of the object in code by typing (in the appropriate Implementation section of the Source editor), for example

Form1.Button1.Height := 48;

If you type this new value into the Source Editor and then look back at the Form Designer, you will see that the button on the Form has taken the new size. The new value will also be shown in the Object Inspector.

In summary, there are usually about three different ways to determine each property of an object:

  • by using the mouse,
  • by setting the values in the Object Inspector,
  • or explicitly by writing code.

The components defined in these Units have several properties that are common to most of them, and other properties that are specific to the individual components. We shall describe the most common ones here. Unusual or control-specific properties will be described for the individual controls.

Additional Help can always be obtained by selecting a property or keyword, in either the Object Inspector or the Source Editor, and pressing F1. You will be taken by your Help browser to the appropriate page in the documentation.

If the description of a property on that page is insufficient, you can navigate to the corresponding description in the ancestor classes, by selecting the links in the Inheritance listing or by selecting the ancestor Type in the declaration of the object.

Constructors such as Create allocate memory and system resources needed by the object. They also call the constructor of any sub-objects present in the class.

Destructors: remove the object and de-allocate memory and other resources. If you call Destroy for an object which hasn't being initialized yet it will generate an error. Always use the Free method to deallocate objects, because it checks whether an object's value is nil before invoking Destroy.

Take the following precautions when creating your own Destroy method:

  • Declare Destroy with the override directive, because it is a virtual method.
  • Always call 'inherited Destroy;' as the last thing on the destructor code.
  • Be aware that an exception may be raised on the constructor in case there is not enought memory to create an object, or something else goes wrong. If the exception is not handled inside the constructor, the object will be only partially built. In this case Destroy will be called when you weren't expecting it, so your destructor must check if the resources were really allocated before disposing of them.
  • Remember to call Free for all objects created on the constructor.
Some commonly listed properties
Property Meaning
Action The main action or event associated with the object. For example selecting an 'Exit' Button might cause the 'Close' action
Align Defines the way in which an object is to be lined up with the parent object. Possible values are alTop (placed at the top and using the full available width), alBottom, alLeft (placed at the left and using the full available height), alRight. alNone (place anywhere on parent control) or alClient (takes all available space next to controls aligned to top, bottom, left or right)
Anchor Used to keep a control a certain distance from the defined edges of a parent control, when the parent is resized. For example [akBottom, akRight] will keep the control a fixed distance from the bottom right corner.
AutoSelect When True, an editing control will select all its text when it receives focus or when the Enter key is pressed.
AutoSelected True indicate that the edit or combobox control has just performed an AutoSelect operation so that subsequent mouse-clicks and keystrokes proceed normally without selecting the text.
BorderSpacing The space around the edge between an Anchored control and its parent.
Caption The text that is displayed on or near the control; it should preferably give some clue as to the function of the control, or an instruction such as 'Close' or 'Execute'. By default Caption is set to be the same as the 'Name' property, and the application programmer should substitute meaningful text instead of the default values.
CharCase Indicates how text is displayed in a text editing control: Normal (retaining the case of the letters typed by the user), converted to uppercase, or converted to lowercase
Constraints Sets the minimum and maximum sizes for a control. If a control is resized the new dimensions are always within the ranges given here. You should take care when setting these options that they do not conflict with the Anchors and Align settings.
Color The Colour to be used to draw the control or to write the text it contains.
Enabled A Boolean property to determine whether or not a control is capable of being selected and performing an action. If it is not Enabled, it is often Grayed out on the Form.
Font The Font to be used for writing the text associated with the control - either the caption or label, or the text-strings contained within the control. The entry on the Object Inspector usually has a (+) box on the left, and selecting this box reveals further options such as character set, colour and size.
Hint A short piece of informative pop-up text that appears if the mouse-cursor hovers over the control.
Items The list of 'Things' that the object contains, such as a group of images, a series of lines of text, a number of actions in an actionlist, etc
Lines An array of strings, containing the textual data in controls with more than a single line of data, such as an Edit-Box or a Combo-Box. The array is zero-indexed, ie the lines are numbered [0..numLines-1]
Name The identifier by which the control is known in the program. The IDE gives it a default name based on the underlying type, for example successive instances of TBitButton would be named Form1.BitBitton1 and Form1.BitButton2; it is up to the application programmer to give them more meaningful names such as ExitButton or OKButton. By default the Name of the control is applied to the Caption for the control, but the text of the Caption may be changed separately.
PopUpMenu A window containing context-sensitive menu information that pops up when the right mouse button is clicked on the object.
Position (or Top, Left) Determines where the control is located on the parent form or window
ReadOnly Boolean property which, if True, signifies that the contents of the control can be read by the user or the calling routine, but cannot be written or changed.
ShowHint Allows a small window containing a context-sensitive Help or other description to be displayed when the mouse cursor 'hovers' over the control.
Size (or Height and Width) The dimensions of the control
Style The options available for Style depend upon the sort of Control being considered: for instance the Style may be defined by TFormStyle, TBorderStyle, TButtonStyle etc.
TabOrder Integer defining where in the sequence of tabs on the Form this control is to lie
TabStop Boolean property which if True places this control in the sequence of objects that the user can reach by successively pressing the Tab key
Text The String of Text that represents the actual data that this control contains. Applies particularly to Text, Memo and StringList types of object. Most of the editing operations (such as Select, Clear, Cut, Copy) are performed in this part of the object, which holds the actual string being edited. If the control contains more than a single line of text, for example TMemo or TComboBox, then the textual elements are arranged as an array of strings (zero-indexed, ie numbered from [0..numLines-1]) in Lines.
Visible If true, the object can be seen on the Form; if False, object is hidden
WordWrap Logical flag to show whether or not word-wrap is enabled, ie if a word comes close to the end of a line and is going to be too long for the line, it is wrapped down to the next line.

Many actions are commonly listed in the 'Events' tab of the Object Inspector. If you select an entry in the list, a ComboBox appears with a DropDown list showing any actions that have aleady been defined, and allowing you to choose one to be associated with this event. Alternatively you can select the ellipsis (three dots ...) and you will be taken to an area of the Source Editor where you can begin typing your own action instructions for the selected event.

While a large number of events is available for any given control, in practice it is only necessary to populate a few of them. For most controls, it is sufficient to provide coding for 'OnClick'; for more complex controls it may be necessary also to provide for 'OnEntry' (when the mouse cursor enters the Control and gives it focus) and 'OnExit' (when the mouse cursor leaves the Control; or you may need to write an event handler for 'OnChange' or 'OnScroll', depending on the nature of the particular control with which you are dealing.

The pop-up menu that appears when you right-click an object in the Form Designer has, as its first item: 'Create default event' and selecting this option will have the same effect as selecting the ellipsis in the Object Inspector for the default event, usually OnClick: you are taken to the Implementation area of the Source Editor where you can type the code for the event handler.

A common strategy in Object-Oriented programming is to provide an ActionList with the facility for entering, removing or editing a number of pre-defined actions from which the most appropriate can be selected to use in any particular instance.

Some commonly listed Actions
Action Meaning
OnChange Action to be taken if any change is detected (eg mouse move, mouse click, key press, edit text, alter picture, etc)
OnClick Action to be taken when the (left) mouse button is clicked. This is usually the main or default action of the control; for example clicking on a button or checkbox initiates the action associated with the checkbox. It may alternatively initate a process of selection, for instance in a TextBox or Memo, or signal the beginning of painting with a Pen or Brush.
Click A method to emulate in code the effect of clicking on a control. This method is most often found in Button-type controls (TButton, TBitBtn, TSpeedButton etc). A procedure can be written that calls the same code as the OnClick action. This facility can be particularly useful if the activation of one control by clicking causes a cascade of other controls to be activated, and the Click method can be used to initiate the action rather than having the user explicitly click on a lot of controls.
OnDragDrop Action to be taken during Drag-Drop manoeuvres, ie when the mouse is used to 'capture' an item or some text etc and move it around the screen to a new location.
OnEntry Action to be taken when the mouse cursor enters the area occupied by the object, usually transfering focus to that object. This might include changes in the appearance of the object such as highlighting or raising the border.
OnExit Action to be taken when the mouse moves out of the area of the object, usually transferring focus out of the object.
OnKeyPress Action to be taken for any key-press. Subtly different from OnKeyDown, which simply responds to a key being down, whether or not it was already down when focus was given to this control. OnKeyPress requires that a key becomes pressed while focus is in this control.
OnKeyDown Action to be taken if a key is down while focus is in this control. Subtly different from OnKeyPress - for example the key might already have been down when focus entered this control, whereas OnKeyPress requires the key to become pressed while focus is in the control.
On Key Up Action to be taken if a key is up (ie not pressed) while focus is in this control.
OnMouseMove On Mouse Down - Action to be taken if the mouse cursor moves while focus is in this control.
OnMouseDown Action to be taken if the mouse button is down while focus is in this control.
OnMouseUp Action to be taken if the mouse button is up while the cursor is over this control. Implies that the mouse button was previously down and has been released. The case where the cursor enters the control but the mouse button has not yet been pressed is covered by OnEntry or OnMouseEnter.
OnResize Action to be taken when the control is resized. Might include re-alignment of text or selection of a different font size etc.
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