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. Custom Scroll Bar Custom Scroll Bar: the base type from which Control Bars are derived TCustomScrollBar TCustomScrollBar Defines the Max and Min values, the size of the page and the position of the scroller Whether Horizontal or Vertical The size of the step to be taken by the scroller for a large change A large change is produced by the user clicking on the blank area above or below the scroller; it is rather analogous to the Page Down or Page Up functions of the Keyboard and is typically set up to move the scroller 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 the size of the page on which this scrollbar is found The position of the scrollbar on the current page 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 scroller or other mouse movement or keyboard event associated with the scrollbar Handler for a scrolling event Control for scrolling a page thumb in specified range. Scroll Bar is a control that allows user to scroll its page thumb in specified range. Can be horizontal or vertical. Determines whether Scroll Bar is vertical or horizontal. The OnChange event is called when the Position is changed. The OnScroll event is called when user scrolls the page thumb. Custom Group Box Custom Group Box: the base type from which Group Box and related components are derived. Group Box 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. 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 Custom Combo Box Custom Combination Box: the base class from which Combo Box is derived. 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 property CharCase: TEditCharCase

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

  • Normal case letters
  • Upper case letters
  • Lower case letters
property AutoCompleteText: TComboBoxAutoCompleteText Options for behavior of the Auto-Complete feature. property AutoSelect: Boolean

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

  • It receives focus
  • The Enter key is pressed.
  • A new item is selected.
property AutoSelected: Boolean 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. property ItemIndex: Integer 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. Combo Box Combo box. A simple combination of text box for free text entry, and a drop-down list allowing one of several options to be chosen. property AutoComplete: Boolean True: Turns on auto-complete feature. False: Turns off auto-complete feature. property AutoCompleteText: TComboBoxAutoCompleteText Options for behavior of the Auto-Complete feature. property AutoSelected: Boolean

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

  • It receives focus
  • The Enter key is pressed.
  • A new item is selected.
property CharCase: TEditCharCase

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

  • Normal case letters
  • Upper case letters
  • Lower case letters
Custom List Box Custom List Box: the base type from which List Box is derived. property ItemIndex: Integer 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 tipically has a different color then the other items. List Box List Box: a simple drop-down list from which a choice is made Custom Edit Custom Edit: the base type from which Edit Box is derived. 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
property AutoSelect: Boolean When True, the edit control will select all its text when it receives focus or when the Enter key is pressed. property AutoSelected: Boolean 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. property CharCase: TEditCharCase

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

  • Normal case letters
  • Upper case letters
  • Lower case letters
Max Length Max Length: maximum length allowed for text string Modified Modified: has the text been modified since creation? Password Character Password Character: 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!) Sel Length Sel Length: the length (in characters) of the text that has been selected for editing Sel Start Sel Start: the index of the character from which selection (for editing) begins Sel Text Sel Text: the text of the actual string that has been selected for editing Text Text: the character string contained in the Edit Box 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 Custom Memo Custom Memo: the base type from which Memo is derived Create Create the Custom memo widget Destroy Destroy the CustomMemo widget when you have finished with it Lines 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] Word Wrap 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 Edit Box Edit Box: for entry or display of a single line of text. property AutoSelected: Boolean Action Action: the task to be performed when the component is activated by a mouse movement or key press. Align Align: Is used to align a Control component to a border of a parent control. Anchors Anchors: keep the edges of a control component a defined distance from certain borders of the parent control. property AutoSelect: Boolean Constraints Constraints: Sets the minimum and maximum sizes for a control. Char Case Character Case: the default character case (Upper or Lower case) to be used in the Edit Box. Can, of course, be over-ridden by use of the [shift] key. Enabled Enabled: flag to determine whether or not the control is able to be used On Change - Action On Change - Action to be taken when any of the properties of the control change (especially the textual content). On Change Bounds - Action On Change Bounds - Action to be taken if any of the bounds of the control are changed. 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 Entry - Action On Entry - Action to be taken when the mouse cursor or text cursor enters the bounds of this control. User-defined Procedure On Exit - Action On Exit - Action to be taken when the mouse or text cursor leaves this control or when focus is relinquished. User-defined Procedure On Key Down - Action On Key Down - Action to be taken if a key is down while focus is in this control. Subtly different from On Key Pressed - for example the key might already have been down when focus entered this control, whereas On Key Pressed requires the key to become pressed while focus is in the control. On Key Press - Action On Key Press - Action to be taken if a key becomes pressed while focus is in this control. Subtly different from On Key Down, which simply responds to a key being down, whether or not it was already down when focus was given to this control. On Key Press requires that a key becomes pressed while focus in in this control. On Key Up - Action On Key Up - Action to be taken if a key is up (ie not pressed) while focus is in this control. On Mouse Down - Action On Mouse Down - Action to be taken if the mouse button is down while focus is in this control. On Mouse Move - Action On Mouse Move - Action to be taken if the mouse cursor moves while focus is in this control. On Mouse Up - Action On Mouse Up - Action to be taken if the mouse button is up (not pressed) while focus is in 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. Password Character Password Character - defines which character should appear in the edit box when a password is being typed. Popup Menu Popup Menu - a menu that appears when the right mouse button is clicked over this control Read Only Read Only - a flag that signifies that users can view the contents of this control but are not allowed to modify it. Show Hint Show Hint - allows a small box containing helpful text to be displayed while the mouse cursor 'hovers' over the control Text Text - the actual character string that represents the contents of the control. May be edited if ReadOnly property is not set Visible Visible - determines whether or not the control can be seen Memo Box Memo box: for entry or display of multiple lines of text. Lines Lines: an array of strings (representing single lines of characters) which contains the textual material held or being entered in the Memo. Max Length Max Length: the maximum permitted length for the textual material in the memo Word Wrap Word Wrap: a logical flag to show whether or not word-wrap is enabled, ie if a word comes near the end of a line and is going to be too long for the line, it is wrapped down to the next line Custom Static Text Custom Static Text: the base type from which Static Text is derived. 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 proceeds normally without selecting the text. False is set when the edit or combobox control looses focus. Static Text Static Text: a box to display a Constant Text String Align Align: Is used to align a Static Text box to a border of a parent control. Anchors Anchors: keep the edges of a static text box a defined distance from certain borders of the parent control. Caption Caption: the text that actually appears with the Static Text Box Constraints Constraints: Sets the minimum and maximum sizes for a control. 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 Button Control Button Control: Base Type for the Button (including Radio Button) and Check Box types ; TButtonControl TCustomButton TCustomButton 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 Is this the Default button? (default setting is False) Is a Modal Result awaited? (default is false) Is this the Cancel button? (default setting is False) 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) The most basic button component Button: 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 executed when the user clicks the button. If you assign an action from an ActionList to a TButton.Action the corresponding execute-method is assigned to the OnClick event of the button.
Anchors are used to keep a button on a defined distance to certain borders of the parent control. Anchors can be used to keep control at a certain distance from a side of its parent control, when the parent control is resized. Autosize in If this property is set to true, the control will automatically adapt its size to be able to accomodate its content. The fixed spacing around the border of the Button Setting this property will make the OnClick event executed when the user hits ESC. Setting this property to true, will have the effect that when the user hits ESC this button is Clicked. Usually the Button which reacts to ESC sets the ModalResult of the form to mrCancel. Sets the text displayed on the button. Constraints can be used to give a control certain minimum and or maximum dimensions. Sets the minimum and maximum sizes for a control. If a control is resized the new dimensions are allways within the ranges given here. You should take care when setting these options that they do not conflict with the Anchors and Align settings. Setting this property will make the OnClick event executed when the user hits ENTER Defines if a button is the default on a form. That is, pressing enter will execute its onClick wether the control has focus or not! Determines if the button reacts to a click. Setting this property determines if the control can be used. Font is used to set the font of the caption of the Button. Font is used to set the font of the caption of the Button. If the button gets clicked, the ModalResult of the form will be set to this value. Setting ModalResult of a button makes closing a form easy. The OnClick event is triggered when a user clicks on the button The OnClick event is triggered when a user clicks on the button. It can also be invoked by calling the Click method. The OnEnter event is triggered when the button gets focus. The OnEnter event is triggered when the button gets focus. The OnExit event is triggered when the button loses focus. The OnExit event is triggered when the button loses focus. TabOrder - an integer value to show where the button lies in the Tab Order for this Form Boolean to determine whether the Button is associated with a Tab Stop in the Tab Order for the form Determines whether the Button is visible. 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. Custom Check Box: 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). 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 selected, deselected or grayed. See TCheckBoxState for possible values of State. Determines if the user can tab to a control. 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. Check Box Check Box: 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. Action Action: the task to be performed when the component is activated by a mouse movement or key press. Align Align: Is used to align a Control component to a border of a parent control. Allow Grayed Allow Grayed: a flag to show whether the box is allowed to be Greyed out, Anchors Anchors: keep the edges of a control component a defined distance from certain borders of the parent control. Caption Caption: a brief description appearing near the check box, usually stating the function of the box or what action will be taken if it becomes checked. Checked Checked - shows whether or not the box has been checked (ie selected) Constraints Constraints: Sets the minimum and maximum sizes for a control. Enabled Enabled: flag to determine whether or not the control is able to be used Hint Hint: a short piece of pop-up text that appears if the mouse-cursor hovers over the check box; On Change On Change - Action to be taken when any of the properties of the control change. On Change Bounds On Change Bounds - Action to be taken if any of the bounds of the control are changed. On Click - Action On Click - Action to be taken when the mouse button is clicked with the cursor over this control. On Entry - Action On Entry - Action to be taken when the mouse cursor or text cursor enters the bounds of this control. User-defined Procedure On Exit - Action to be taken when the mouse or text cursor leaves this control or when focus is relinquished. On Mouse Down - Action On Mouse Down - Action to be taken if the mouse button is down while focus is in this control. On Mouse Move - Action On Mouse Move - Action to be taken if the mouse cursor moves while focus is in this control. On Mouse Up - Action On Mouse Up - Action to be taken if the mouse button is up (not pressed) while focus is in this control. On Resize - Action On Resize - Action to be taken when the control is resized. Might include selection of a different font size etc. Popup Menu Popup Menu - a menu that appears when the right mouse button is clicked over this control Show Hint Show Hint: a flag to show whether or not the hint is to be shown when the mouse cursor hovers over the box. Visible Visible - determines whether or not the control can be seen Toggle Box Toggle Box: a labelled box capable of being checked (when it becomes recessed) or unchecked (when it is raised). Radio Button Radio Button: a button which 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. Custom Label Custom label: the base type from which Label is derived. Label Label: a brief text label to be placed in the Form near any object that needs to be identified. Align Align: Is used to align a Control component to a border of a parent control. Anchors Anchors: keep the edges of a control component a defined distance from certain borders of the parent control. Caption Caption - the text string that represents the contents of the label Constraints Constraints: Sets the minimum and maximum sizes for a control. Visible Visible - determines whether or not the control can be seen Word Wrap Word Wrap: a logical flag to show whether or not word-wrap is enabled, ie if a word is near the end of a line and is going to be too long for the line, it is wrapped down to the next line On Click On Click - Action to be taken when the mouse button is clicked with the cursor over this control. User-defined Procedure On Double-click On Double-click - Action to be taken when the mouse button is double-clicked with the cursor over this control. On Mouse Down - Action On Mouse Down - Action to be taken if the mouse button is down while focus is in this control. On Mouse Movement - Action On Mouse Movement - Action to be taken if the mouse cursor moves while within the bounds of this control. User-defined Procedure On Mouse Up On Mouse Up - Action to be taken if the mouse button is up while the cursor is over this control. On Mouse Entry On Mouse Entry - Action to be taken when the mouse cursor enters the bounds of this control. User-defined Procedure On Mouse Leaving On Mouse Leaving - Action to be taken when the mouse cursor leaves the boundaries of this control. User-defined Procedure. On Change Bounds On Change Bounds - Action to be taken if any of the bounds of the control are changed. 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 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.