Common controls used in Lazarus forms.

comctrls.pp contains classes and types like those found in the Delphi comctrls unit.

The following components are added to the Lazarus IDE:

Common Controls Tab

- TTrackbar
- TProgressBar
- TTreeView
- TListView
- TStatusBar
- TToolBar
- TCoolBar
- TUpDown
- TPageControl
- TTabControl
- THeaderControl

The following components are added but not displayed on the component palette:

- TToolButton
- TTabSheet

This file is part of the LCL package.

Represents permissible results for a hit test.

THitTest is an enumerated type with values that represent permissible results for a hit test (position of a mouse click etc relative to objects on a form). Values from THitTest are stored in the THitTests set type.

The action was above the coordinates for the control.
The action was below the coordinates for the control.
The action was not near the control checking for the event.
The action was on the control checking for the event.
The action was on a button in the control.
THitTests
- set of THitTest.
Represents the style used for a panel on a status bar.

TStatusPanelStyle is an enumerated type representing the style used for a panel on a status bar. TStatusPanelStyle is the type used to implement the Style property in TStatusPanel, and used in widgetset classes which initialize or update a status bar panel.

The panel contains Text.
The panel uses an owner-drawn style (generally implemented in an event handler).
Enumerated type with the bevel styles used on status bar panels.

TStatusPanelBevel is an enumerated type with values which represent bevel styles used on status bar panels. TStatusPanelBevel is the type used to implement the Style property in TStatusPanel.

No bevel is drawn on a panel.
Drawn using a lowered bevel style.
Drawn using a raised bevel style.
Lists the possible parts that make up a status panel.

TPanelPart is an enumerated type listing the possible parts that make up a status panel.

Panel part contains text with text alignment.
Panel parts contains a bevel style.
Panel part contains a width value.
Set type used to store TPanelPart values.

TPanelParts is a set type used to store TPanelPart values.

Class reference used to create new instances of TStatusPanel.

TStatusPanelClass is the type returned by the GetPanelClass method in TStatusBar. The class reference is used in the CreatePanel method in TStatusBar to create a new panel for the control.

Implements a panel displayed in TStatusBar.

TStatusPanel is a TCollectionItem descendant which implements panels used in TStatusBar. Instances of the class are created by and stored in a TStatusPanels collection in a TStatusBar control. Use the properties in the panel to control its appearance, size, and textual content.

Gets the value for the Alignment property.
New value for the property.
Sets the value for the Bevel property.
New value for the property.
Sets the value for the Style property.
New value for the property.
Sets the value for the Text property.
New value for the property.
Sets the value for the Width property.
New value for the property.
Field used by Widgetset classes. Do not use it in the LCL.
Field used by Widgetset classes. Do not use it in the LCL.
Gets the value displayed as the name for the collection item.

GetDisplayName is an overridden String function which returns the value displayed as the name of the collection item. The value in the Text property is used as the return value when it is not an empty string (''). Otherwise, the inherited GetDisplayName method is called to get the return value.

TCollectionItem.DisplayName
Value displayed as the name for the collection item.
PanelChanged
- method for dealing with a status panel, one or more of whose parts has changed.
SetIndex
saves the old index value, checks that the supplied value is different and then calls inherited method.
TCollectionItem.Index
Create
- constructor for TStatusPanel: sets default width, alignment and bevel, calls inherited Create and loads into StatusBar.
TCollectionItem.Create
Collection which owns the status panel.
Destroy
- destructor for TStatusPanel: calls inherited Destroy and removes itself from the StatusBar.
TCollectionItem.Destroy
Assign
copies text, width, alignment, bevel and style properties from Source if it is of correct type, otherwise calls inherited Assign (which will probably raise an exception).
TPersistent.Assign
Class instance with the values stored in the status panel.
The StatusBar that contains this StatusPanel
Status bar where the panel is displayed.
Alignment
- whether left- or right-justified or centered.
Only supported on Windows.
The type of Bevel for the display.
Only supported on Windows.
Introduces BiDiMode support not present in the ancestor class.
Introduces BiDiMode support not present in the ancestor class.
Style
- whether text or something drawn by the owner.
Text
- the string for display in the StatusBar.
The Width of this panel on the StatusBar.
TStatusPanels
- the collection of Status Panels in this StatusBar.
Gets the value for the indexed Items property.
TCollection.GetItem
Value for the property.
Ordinal position for the requested collection item.
Sets the value in the indexed Items property.
TCollection.SetItem
Ordinal position for the collection item stored in the method.
New value for the collection item.
GetOwner
returns a Status Bar overriding the inherited method.
TPersistent
Persistent object that owns the status panel.
Ensures that observers are notified when he specified collection item has been changed.
TCollection
Collection item for the notification.
Constructor for the class instance.
Create
- constructor for TStatusPanels: calls inherited Create and attaches itself to StatusBar.
TCollection.Create
The control where the status panel is displayed.
Adds a new TStatusPanel instance to the collection.

Calls the inherited Add method and casts the result to TStatusPanel for use as the return value. Calls the UpdateHandleObject method in StatusBar to ensure that an update sequence is started when the handle for the status bar has been allocated.

TCollection.Add
Status panel added in the method.
Provides indexed access to the TStatusPanel items in the collection.
TCollection.Items
Ordinal position for the collection item.
The StatusBar to which this collection of Status Panels belongs.
TSBCreatePanelClassEvent
- generic event handling procedure for creating a Status Bar panel class.
Specified an event handler used to draw a panel in a status bar.

TDrawPanelEvent is the type used to implement the OnDrawPanel property in TStatusBar.

Status bar for the event notification.
Panel drawn by the event handler.
Drawing area for the event notification.
TStatusBar
- a strip along the bottom of a form for displaying information on current status.

TStatusBar - a strip along the bottom of a form for displaying information on current status. The bar may consist of a single SimplePanel in which case the displayed text is contained in SimpleText.

However if SimplePanel is false, then there can be multiple panels or sub-sections of the status bar whose properties are described in Panels.

The property SimpleText can be assigned in code to display the value of some variable, such as the position of the Splitter in the example.

Sets the value for the Panels property.
New value for the property.
Sets the value for the SimpleText property.

Notifies the widgetset class of the value change when a handle has been allocated and SimplePanel is set to True.

New value for the property.
Sets the value for the SimplePanel property.
New value for the property.
Sets the value for the SizeGrip property.
New value for the property.
CreateWnd
calls inherited method, then fixes handles if needed.
TWinControl.CreateWnd
DestroyWnd
calls inherited method and frees handles.
TWinControl.DestroyWnd
Loaded
calls inherited method and fixes handles if needed.
TWinControl.Loaded
UpdateHandleObject
- updates all panel parts that have been changed.
CalculatePreferredSize
calls inherited method then supplies its own values if any are missing.
TControl.CalculatePreferredSize
Sets the value in the BiDiMode property.

Ensures that all panels in the status bar update their alignment to match the new value for the property. Calls UpdateHandleObject to ensure that an update sequence is started for the control when its handle has been assigned.

TControl.BiDiMode
New value for the property.
CreatePanel
- returns a created Status Panel.
Status panel creates in the method.
CreatePanels
- returns a set of created panels.
Status panels created in the method.
GetPanelClass
- returns a class of status panel.
Class type used for status panels.
DoSetApplicationHint
- specifies a hint string and returns True if successful.
Displays the hint for the status bar.
DoHint
shows the hint text for the control and returns True when successful. Uses the OnHint event handler.
DrawPanel
calls the OnDrawPanel event handler if assigned.
Panel to draw in the method.
Display rectangle for the drawing operation.
LMDrawItem
- LCL message handler for drawing the item on the current canvas.
Message handled in the method.
Performs actions needed to apply the layout policy in AMode.

Calls BeginUpdate to reduce the number of refreshes needed when updating panels in the status bar. Adjusts the width of all items in the Panels collection using the factor in AXProportion. The value in AYProportion is ignored in the method. Calls EndUpdate prior to exit from the method.

No actions are performed in the method when AMode contains a TLayoutAdjustmentPolicy value other than lapAutoAdjustWithoutHorizontalScrolling or lapAutoAdjustForDPI.
Layout policy applied in the method.
Horizontal sizing factor applied to panels in the status bar.
Vertical sizing factor applied to panels in the status bar.
Constructor for the class instance.

Create is the constructor for TStatusBar. It calls the inherited Create method, and initializes a number of local variables, including:

- AutoHint
- Canvas
- ControlStyle
- Color
- Align
- AutoSize
- SimplePanel

TComponent.Create TWinControl.Create
Owner of the class instance.
Destroy
- destructor for TStatusBar: frees canvas and panels, then calls inherited Destroy.
TWinControl.Destroy TComponent.Destroy
Updates the panel at the specified position in the Panels for the status bar.

InvalidatePanel renders the panel with specified index non-valid. Calls UpdateHandleObject to ensure that the widgetset class is notified of the change to the specified panel.

No actions are performed in the method when the PanelParts argument is an empty set ([]).
Ordinal position for the panel affected in the method.
Panel parts affected in the method.
BeginUpdate
- starts the update process.
EndUpdate
- finishes the update process.
ExecuteAction
: if required action is a Hint-related, sets the Hint in place, otherwise calls inherited method.
TComponent.ExecuteAction
Gets the ordinal position for the panel at the specified coordinates.

GetPanelIndexAt gets the ordinal position for the panel at the specified coordinates. The return value is -1 when Panels have not been defined in the status bar. No actions are performed in the method when Panels is empty.

GetPanelIndexAt uses the display rectangle for the control to determine in the specified coordinates are within one of the Panels defined for the control. When True, each of the items in the Panels collection are examined to determine if the point is within a specific panel. The ordinal position for the panel is assigned as the return value.

Ordinal position for the status panel, or -1 when no panel is located at the specified coordinates.
Horizontal coordinate to locate in the Panels for the status bar.
Vertical coordinate to locate in the Panels for the status bar.
SizeGripEnabled
- returns True if the size-grip (an area at the bottom of the statusbar where a mouse can grip to change the size) is enabled.
UpdatingStatusBar
- returns True if the status bar is being updated.
True if the status bar is being updated.
The Canvas where the Panels for the StatusBar are are Painted.
Specifies the placement of the control inside its Parent.

Align is a TAlign property which specifies how the control is aligned to its parent control. The default value for the property is alBottom in TStatusBar.

TControl.Align
Indicates if a hint is automatically shown when the mouse hovers over the status bar.

The default value for the property is False.

Indicates if the control is automatically resized to fill the area on its aligned edge.

The default value for the property is True in TStatusBar.

TControl.AutoSize
The background color of the control.

The default value for the property is clDefault or clBtnFace (depending on the UseCLDefault compiler define).If the color is clDefault , the result will need to be passed through GetDefaultColor to resolve clDefault to an actual TColor value.

Convenience routines which obtain the color by resolving clDefault and ParentColor are also provided as TControl.GetColorResolvingParent and TControl.GetRGBColorResolvingParent.

TControl.Color
Collection with the TStatusPanel instances defined for the control.

Panels is a collection used to store TStatusPanel class instances added to the status bar. Panels are significant when the SimplePanel property is set to False; when SimplePanel contains True, the status bar displays the value in SimpleText across the entire width for the status bar.

Use CreatePanel to create a new status panel displayed on the status bar. Or use the editor provided in the Lazarus IDE Object Inspector to maintain the items in the Panels collection at design-time.

SimpleText
- a character string containing the information to be displayed in the Status Bar.

SimpleText - a character string containing the information to be displayed in the Status Bar. This is displayed if SimplePanel is true; otherwise the information in Panels is displayed.

Indicates if a single panel is displayed in the status bar with the text in SimpleText.

SimplePanel is a Boolean property which indicates if a single panel is displayed in the status bar with the text in SimpleText

If True, the value of SimpleText is displayed; if False, the contents of the individual Panels is displayed.

Contents can be adjusted with a stringlist editor that pops up when the ellipsis (...) next to Panels is selected and allows insertion of an arbitrary number of sub-panels with their own strings.

Displays a sizing grip used to resize the parent form.

SizeGrip is a Boolean property which indicates if a sizing grip (or grabber) is visible for the status bar. The sizing grip is a triangular shape displayed at the bottom-right of the status bar, and provides an alternate way to resize the parent form using the mouse. It presents a larger mouse target than a window border.

The default value for the property is True, and indicates that the sizing grip is visible.

Setting a new value for the property causes the widgetset class to be notified of the change if the handle has been allocated for the control.

Use SizeGripEnabled to determine if the sizing grip is enabled in the control.

TCustomForm.BorderStyle TControl.Parent
Indicates the System font is used for the control.
This is used to provide VCL-compatibility in widgetset classes.
Indicates if the control is visible.

Allows the control, and all of its children, to be displayed or hidden. Visible is set to True by Show , or to False by Hide. Calling these methods is equivalent to setting the Visible property.

The default value for the property is True in TStatusBar.

TControl.Visible
Event handler signalled to get the class used to create new panels in the status bar.

OnCreatePanelClass is signalled (when assigned) in the CreatePanel method to get the class used to create new panels in the status bar. Assign an object procedure using the signature in TSBCreatePanelClassEvent to the property to override the value provided by the GetPanelClass method.

Event handler signalled to draw a panel in the status bar.

OnDrawPanel is an event handler used to draw the specified panel on the status bar. OnDrawPanel is signalled (when assigned) from the DrawPanel method. Assign an object procedure using the signature in TDrawPanelEvent to render the specified panel to the desired rectangle in the status bar.

Event handler for showing a hint when required.
Contains values which can be assigned to the Flags property in TCustomPage.
Reflects the status or state for the handle used in a custom page control.
Handle for the page has been added to the notebook.
Handle for the page is being added to the notebook.
Removing the page handle from the notebook.
Inserting the page handle into the notebook.
Set type used to store TPageFlag enumeration values.

TPageFlags is the type used to implement the Flags property in TCustomPage.

The base class for TTabSheet.

TCustomPage is a TWinControl descendant which implements the base class for the tabbed pages found in notebooks. TCustomPage provides properties used to maintain the order and visibility of the page, and event handlers signalled when the page is hidden or displayed.

Using Multi-Page Controls
Sets the value for the ImageIndex property.

Notifies the widgetset class of changes to properties in the custom page.

New value for the property.
Sets the value for the TabVisible property.
New value for the property.
Registers the widgetset class used for the class instance.
Handles the LM_PAINT message for the control.

WMPaint is an overridden method in TCustomPage which handles the LM_PAINT message for the control. It calls the inherited method to render the control. No actions are performed in the method if the Parent is a TCustomTabControl descendant and the class instance is not the current page in the Parent control.

TWinControl.WMPaint
Message handled in the method.
Sets the Parent control for the custom page.
TControl.SetParent
New value for the Parent property.
Contains flag values that represent the status or state for the handle in the custom page control.

Values in Flags are normally added or removed when changes are performed in a control which uses the page control class instance. See TPageFlag for more information about enumeration values and their meanings.

Handles the CM_HITTEST control message.

CMHitTest checks the type for the Parent control to determine whether the Message is ignored or forwarded to the inherited method. When Parent is a TCustomTabControl descendant, the class instance must be the active page in the parent control. When it is not, the Message result is set to 0 and the message is ignored. Otherwise, the inherited method is called to handle the Message.

TControl.CMHitTest
Control message handled in the method.
Handles the CM_VISIBLECHANGED message for the control.

Calls the inherited method to handle a focus change and update the control state. If the control is Visible, the DoShow method is called to signal the OnShow event handler (when assigned). Otherwise, DoHide is called to signal the OnHide event handler (when assigned).

TWinControl.CMVisibleChanged
Control message handled in the method.
Gets the value for the PageIndex property.
Value for the property.
Sets the value for the PageIndex property.
New value for the property.
Gets the value for the TabVisible property.
Value for the property.
Provides support for a TCustomTabControl parent when handling a dialog accelerator key.

Calls the inherited DialogChar method when Parent is not derived from TCustomTabControl.

TWinControl.DialogChar
True if message contains an accelerator key handled in the method.
Message examined in the method.
Performs actions needed when Visible is changed to False.

DoHide is a method used to perform actions needed when the Visible property is changed to False. DoHide signals the OnHide event handler (when assigned).

DoHide is called from the CMVisibleChanged message handler.

Performs actions needed when Visible is changed to True.

DoShow is a method used to perform actions needed when Visible property is changed to True. DoShow signals the OnShow event handler (when assigned).

DoShow is called from the CMVisibleChanged message handler.

Updates the Flags property when the Handle for the control is freed.

DestroyHandle is an overridden method used to update the control when its Handle is freed in the widgetset class. DestroyHandle calls the inherited method on entry, and updates the Flags property to exclude the value pfAdded.

TWinControl.Handle TWinControl.DestroyHandle
Notifies the widgetset to change the text for the control.

RealSetText is overridden in TCustomPage to notify the widgetset class of the value change when the Parent control is assigned and has a valid Handle. RealSetText calls the inherited method to apply the new value. AdjustSize is called if the widgetset class was notified.

TWinControl.RealSetText TWinControl.Handle TControl.AdjustSize
Value used for the Text (Caption) in the control.
Constructor for the class instance.

Create is the overridden constructor for TCustomPage, and calls the inherited constructor on entry. Create sets the default values for the style, visibility, alignment and caption in the class instance.

TWinControl.Create
Owner of the class instance.
Indicates if the Tab key can be used to navigate into or out of the control.

Always returns False in TCustomPage.

TWinControl.CanTab
Always returns False.
Indicates whether the control is visible.

IsControlVisible is an overridden method in TCustomPage which indicates whether the control is visible.

If AutoSizingAll is set to True, no actions are performed in the method and the return values is True. This allows inactive pages to be considered in the GetPreferredSize method in the parent control.

IsControlVisible calls the inherited method on entry to determine if the Visible property is set to True, and whether the control is visible at design-time. When the Parent control is TCustomTabControl, the value in the PageIndex property must match the value in the parent control.

The return value is True when all of the conditions are satisfied.

TControl.IsControlVisible
True when the control is visible.
Gets the index number for a visible page within all of the visible pages.

VisibleIndex is an Integer function used to get the ordinal position for the page instance within the list of visible pages for the Parent control.

When Parent is a TCustomTabControl descendant, its TCustomPage instances are examined to find the current class instance. At run-time, only pages with the TabVisible property set to True are considered in the method. At design-time, all pages are examined.

The return value is the relative position in the list of visible pages where the current class instance was found. The return value is -1 if the current page was not found in the Parent control, or when none of the pages in the Parent control are visible.

When Parent is not derived from TCustomTabControl, the return value is always -1.

Ordinal position for the visible page, or -1 when not found or not visible.
Ensures that the specified control is derived from TCustomTabControl.

Raises an EInvalidOperation exception when AParent is not derived from TCustomTabControl. Calls the inherited CheckNewParent method when AParent is unassigned or derived from TCustomTabControl.

Raises an EInvalidOperation exception when AParent is not derived from TCustomTabControl.
TControl.CheckNewParent
Parent control examined in the method.
Ordinal position for the page in the parent control.

PageIndex is an Integer property which contains the ordinal position for the page control in its Parent control. Setting a new value for the property causes the Parent control to call its MoveTab method to reorder the pages. This action is performed when the Parent control is descended from TCustomTabControl.

Indicates if the tab in the Parent control is visible.

TabVisible indicates if the Tab in the Parent control is visible.

Changing the value in the property cause the Parent control to be updated to reflect the new value. No actions are performed in the method at design-time, or when the property value is not different than the stored value.

When the Parent control has been assigned and has a handle allocated, the TCustomTabControl in Parent is updated to reflect the new value for the property. When True, the active page in the Parent control is changed to the current page instance if one has not already been assigned in the Parent. The page and its handle are removed from the Tab control when the property value is False.

Use IsControlVisible to determine if the page is currently the active page displayed in the Parent tab control.

Ordinal position for the image associated with the page.

ImageIndex contains the ordinal position in an image list for the image associated with the page instance. The default value for the property is -1 and indicates that an image has not been assigned for the page. The image list is a property available in the Parent control.

Changing the value for the property causes the widgetset class to be notified using its UpdateTabProperties method.

No actions are performed in the method during LCL component streaming, or when the Handle for the control has not been allocated.

Not stored in LCL component streaming for TCustomPage.
The value for the Left property is not stored in the LCL component streaming mechanism for TCustomPage.
TControl.Left
Not stored in LCL component streaming for TCustomPage.
The value for the Top property is not stored in the LCL component streaming mechanism for TCustomPage.
TControl.Left
Not stored in LCL component streaming for TCustomPage.
The value for the Width property is not stored in the LCL component streaming mechanism for TCustomPage.
TControl.Width
Not stored in LCL component streaming for TCustomPage.
The value for the Height property is not stored in the LCL component streaming mechanism for TCustomPage.
TControl.Height
Not stored in LCL component streaming for TCustomPage.
The value for the TabOrder property is not stored in the LCL component streaming mechanism for TCustomPage.
TWinControl.TabOrder
Not stored in LCL component streaming for TCustomPage.

The value for the Visible property is not stored in the LCL component streaming mechanism for TCustomPage.

TControl.Visible
Event handler signalled when the page is hidden.

OnHide is a TNotifyEvent property with the event handler signalled when the page is hidden. OnHide is signalled from the DoHide method, and occurs when the value in the Visible property is set to False.

Applications can implement and assign a handler routine to respond to the event notification. The Sender argument contains the TCustomPage instance for the event notification.

Event handler signalled when the page becomes visible.

OnShow is a TNotifyEvent property with the event handler signalled when the page becomes visible. OnShow is signalled from the DoShow method, and occurs when the value in the Visible property is set to True.

Applications can implement and assign a handler routine to respond to the event notification. The Sender argument contains the TCustomPage instance for the event notification.

Class reference used to create a new TCustomPage instance.
Ancestor for the TNBPages class.

TNBBasePages specifies the ancestor for TNBPages, and provides virtual abstract methods used to maintain a list of TCustomPage objects associated with a TCustomTabControl (also called a "notebook"). Use the TNBPages descendant which provides concrete method implementations and additional properties and methods for the purpose.

Gets the ordinal position for the specified page object.
Ordinal position for the specified page object, or -1 when not found.
Page object to locate in the list.
Inserts the specified page at the given position in the list.
Ordinal position where the page is inserted.
Page object inserted in the method.
Deletes the page at the specified position in the list.
Ordinal position for the page deleted in the method.
Gets the page object stored at the specified position in the list.
Page object stored at the specified position in the list.
Ordinal position in the list for the requested page object.
Constructor for the class instance.

Calls the inherited constructor. Please note: The value in theNotebook is ignored in the method. Use the derived TNBPages class which stores the notebook where the page objects are used.

Notebook (or custom tab control) for the page objects; Ignored in the method.
Class reference used to create new instances of TNBBasePages.
Implements a list of pages used in TCustomTabControl.

TNBPages is a TNBBasePages descendant which implements a list of pages used in TCustomTabControl.

TNBPages extends the ancestor class to include properties for the TCustomTabControl which owns the list of pages (Notebook), and the internal list used to store the TCustomPage instances (PageList). It implements the abstract virtual methods defined in the ancestor, and provides additional methods to maintain the pages in PageList.

Implements the OnChange event handler for the page list.
Implements read access to values for the Strings property.

Read access is redirected to the PageList property. The return value contains the Caption for the TCustomPage instance stored at the specified position in PageList.

TStringList
Returns the Caption for the page.
Ordinal position for the requested value.

GetCount is an overridden method in TNBPages, and returns the number of items stored in PageList.

Gets the number of pages in the class instance.

GetObject is an overridden method in TNBPages, and redirects indexed object access to the PageList property. The return value is a TObject instance, and must be cast to TCustomPage to access its properties and methods.

Use GetPage to get a page in PageList as a TCustomPage instance.

TStringList
Object stored at the specified position.
Ordinal position for the object requested in the method.
Gets the position in PageList for the specified page.
Ordinal position for the page instance, or -1 when not found.
TCustomPage instance to locate in the list of pages.
Inserts a page instance at the specified position in the page list.
Ordinal position in the page list for the inserted value.
Page instance inserted into the page list.
Deletes the page stored at the specified position in the page list.
Ordinal position for the page removed from the page list.
Gets the page stored at the specified position in PageList.

GetPage implements the abstract method defined in the ancestor, and is used to get a TCustomPage instance stored at the specified position in PageList. GetPage calls the GetObject method to retrieve the page, and casts it to the TCustomPage type used in the return value.

TCustomPage instance stored at the specified position.
Ordinal position in PageList for the requested page.
List with the TCustomPage instances for the class instance.

PageList is a read-only TListWithEvent property which contains the TCustomPage instances for the class instance.

PageList includes an OnChange event handler used to perform notifications when values are added, retrieved, or deleted in the list. The private PageListChange method implements the handler, and ensures that new items in the list are parented to the control in Notebook.

Most methods in TNBPages are redirected to PageList to get or set their values.

TListWithEvent TListNotification
Provides a reference to the control which owns the pages.
Constructor for the class instance.

Create is the constructor for TNBPages, and calls the inherited Create method. It sets up the list of pages for the notebook (tab control).

TObject.Create
Control which owns the class instance (and its pages).
Destructor for the class instance.

Frees and releases resources allocated to PageList.

Removes all pages stored in the class instance.

Calls Delete until all TCustomPage instances in PageList have been removed.

TStrings.Clear
Deletes the page stored at the specified position in the page list.
TStrings.Delete
Ordinal position for the page removed from the list.
Inserts a new page with the given name at the specified position in PageList.

Insert calls the GetPageClass method in NoteBook to get the class reference used to create the new page. The owner of the page instance is the NoteBook control (or its owner when assigned). The value in S is assigned as the Caption in the TCustomPage instance. The InsertPage method in NoteBook is called to store the TCustomPage instance at the position in Index.

TStrings.Insert
Ordinal position where the new page is stored.
Name (Caption) used for the new page instance.
Re-implements an empty page container for TCustomTabControl controls.

TNBNoPages is a TNBBasePages descendant which re-implements the page container for a TCustomTabControl. As the name implies, it does not actually use TCustomPages instances in the container. It removes the methods used to add and maintain the values in the class instance.

TTabChangingEvent
- generic event handling method for a change in a notebook Tab.
Notebook for the event notification.
Indicates if the tab change can be performed.
Represents the position for a tab relative to its page.

TTabPosition is an enumerated type with values that represent the position for the tabs in TCustomTabControl relative to its page. TTabPosition is the type used to implement the TabPosition property in TCustomTabControl.

Displays tabs along the top edge of the page.
Displays tabs along the bottom edge of the page.
Displays tabs vertically along the left edge of the page.
Displays tabs vertically along the right edge of the page.
TTabStyle
- enumerated type for tab style: normal, buttons or flat buttons.

TTabStyle is an enumerated type with values that define the drawing style used for tabs in TCustomTabControl. TTabStyle is the type used to implement the Style property in TCustomTabControl.

Tabs are drawn using the tab style common to manilla file folders.
Tabs are drawn as buttons.
Tabs are drawn as buttons using a flat (non-raised) appearance.
TTabGetImageEvent
- generic event handling method for getting an image for a Tab.
Object for the event notification.
TCTabControlOption
- Show the close button on a tab, allow multi-line tabs.
TCTabControlOptions
- set of TCTabControlOption.
TCTabControlCapability
- enumerated type containing possible capabilities of a notebook or tabbed control.
nbcShowCloseButtons, nbcMultiLine, nbcPageListPopup, nbcShowAddTabButton
TCTabControlCapabilities
- set of TCTabControlCapability.
TDrawTabEvent
- generic event handling procedure for drawing a tab with given index at the specified rectangle.
Implements the base class for tabbed controls in the LCL.

TCustomTabControl - base class for TTabControl, a series of Tabs along the edge of a display area; selection of a Tab governs the contents of the DisplayRect

A tab control has a series of Tabs and it may or may not contain pages.

Using Multi-Page Controls
Notifies the widgetset class when PageIndex has been changed.
Notifies the widgetset class when ShowTabs has been changed.
Notifies the widgetset class when TabPosition has been changed.
Notifies the widgetset class when TabSize has been changed.
Notifies the widgetset class when Images has been changed.
Gets the value for the ActivePage property.

Uses an internal index value to get the caption for the TCustomPage in the Page property.

Value for the property.
Gets the value for the ActivePageComponent property.
Value for the property.
Gets the value for the DisplayRect property.
Value for the property.
Gets the value for the MultiLine property.
Value for the property.
Locates a visible page in the tab control.

FindVisiblePage is used to locate a Page in the tab control with its TabVisible property set to True.

Index specifies the ordinal position in Pages property that is the search locus. FindVisiblePage searches the Page collection in ascending order starting at the position in Index. If a visible page is not found, Page is searched in descending order starting at Index -1.

The return value contains the ordinal position in the indexed Page property where the visible tab was located, or -1 when there are no visible tabs in Page.

Ordinal position for the visible page tab, or -1 when a visible tab is not found.
Ordinal position where the search is started.
Implements the storage specifier for the ActivePage property.

Always returns False in TCustomTabControl.

Always returns False in TCustomTabControl.
Moves the specified page control to the position in NewIndex.
Page object moved in the method.
New position in the list of pages.
Sets the value for the MultiLine property.
New value for the property.
Sets the value for the Style property.
New value for the property.
Notifies the widgetset class when a page is moved in the control.
Performs action needed when the current page object is removed from the tabbed control.
Ordinal position for the page object removed from the tabbed control.
Sets the value for the ActivePage property.
New value for the property.
Sets the value for the ActivePageComponent property.
New value for the property.
Sets the value for the Images property.
New value for the property.
Sets the value for the ImagesWidth property.
New value for the property.
Sets the value for the PageIndex property.
New value for the property.
Sets the value for the Pages property.
New value for the property.
Sets the value for the ShowTabs property.
New value for the property.
Sets the value for the TabHeight property.
New value for the property.
Sets the value for the ShowTabs property.
New value for the property.
Sets the value for the TabWidth property.
New value for the property.
Ensures that the current page has its Visible property set to True.

ShowCurrentPage checks the value in PageIndex to determine if a valid page index has been specified. No actions are performed in the method when PageIndex is less than 0 or greater than PageCount - 1.

ShowCurrentPage gets the TCustomPage instance in Page at the position in PageIndex, and sets its Visible property to True. If the Page is Enabled, it SetFocus method is called.

ShowCurrentPage sets the Visible property in the previously selected Page to False.

Updates control style flags to hide or display pages in the control at design-time.
Updates control style flags for the specified page to hide or display the control at design-time.
Ordinal position for the Page updated in the method.
Notifies the widgetset class when the handle for the image resolution is freed.
TApplication.QueueAsyncCall
Image list for the event notification.
Not used in the method.
Not used in the method.
Performs actions needed when an image list in the control is changed.

Queued and executed asynchronously by the Application instance.

Pointer to the Data for the asynchronous event.
Performs actions needed to apply the specified auto-adjust layout policy.
TControl.DoAutoAdjustLayout
Gets the class type used to create new page instances in the control.
Class type used to create new page instances in the control.
Gets the class type used to access a list of pages in the control.
Class type used to access a list of pages in the control.
Sets the value for the Options property.
New value for the property.
Notifies the widgetset class when a page handle is added or removed in the control.
Page instance with the handle added or removed.
Handles the CN_NOTIFY message for the control.

Handles TCN_SELCHANGE and TCN_SELCHANGING notification codes in Message.

Control notification message handled in the method.
Creates the Handle for the widgetset object and displays the selected tab and page.

Calls the inherited method on entry. Adds or removes handles for pages on the control. Displays the visible tabs and the active page for the control.

TWinControl.CreateWnd
Notifies the widgetset class of the active page when the control Handle is allocated.

Notifies the widgetset class of the value in PageIndex when the control Handle has been allocated.

TWinControl.Loaded
Performs actions needed when the active page for the control has been changed.

Performs actions needed when the active page for the control has been changed. Signals the OnChange event handler (when assigned). Called when a new value is assigned to PageIndex.

Performs actions to show or hide pages when the current page is changed.

Change is a method used to performs actions needed to show or hide pages in the tabbed control.

Change calls ShowCurrentPage to display the page in PageIndex, and hide the previously visible page in the tabbed control. Change calls DoChange when the control is not being destroyed, or loaded in the LCL component streaming mechanism.

Change is called from the MoveTab method, and when selection change messages are handled for the control.

Handles page navigation using the Tab key.

KeyDown is overridden in TCustomTabControl to handle use of the Tab key (VK_TAB) to change the active page in the tabbed control.

The Options property must contain the value nboKeyboardTabSwitch to enable the tab switching feature. Pressing Ctrl+Tab switches to the next page by incrementing the PageIndex value. Pressing Ctrl+Shift+Tab switches to the previous page by decrementing the PageIndex value.

If Key is not the VK_TAB virtual key code, the inherited method is called to handle the values in Key and Shift.

TWinControl.KeyDown
Virtual key code examined in the method.
Key modifier(s) used in the method.
Handles an accelerator key for the active page in the tabbed control.
TControl.DialogChar
True if the accelerator was handled in the active page.
Message with the accelerator key examined in the method.
Updates the internal page index without triggering an OnChange event.
New value for the internal page index.
Makes the specified page object the active page in the tabbed control.

ShowControl gets the position for the control specified by the APage argument in the Page property, and makes it the active page in the tabbed control. If the control is not found in Page, the inherited ShowControl method is called to display the control.

ShowControl is provided for Delphi compatibility.

TWinControl.ShowControl
Page object to locate and display in the method.
IndexOfTabAt
returns the index value for the Tab located at the specified client coordinates.
Gets the index for the page at the specified client coordinates.
UpdateTabProperties
- apply all pending changes to the Tab.
GetControlClassDefaultSize
returns its own defaults, overriding inherited values.
TControl.GetControlClassDefaultSize
Handles the notification when a component is added to or removed from the control.

Notification is overridden in TCustomTabControl to ensure that resources allocated for the Images property are Nil'd when the component is removed.

TControl.Notification
Component for the notification.
Operation performed for the component.
The active TCustomPage instance for the tabbed control.

ActivePageComponent is a TCustomPage property which indicates the active page component for the tabbed control.

PageIndex is used to access the page instance in Page with the property value. The property value is Nil when PageIndex contains a value that is not in the range 0..PageCount-1.

Setting a new value for the property causes the IndexOf method to be called to locate the value in the list of pages. PageIndex is updated to reflect the position for the specified page, and may contain -1 if pages are not used in the tabbed control.

Use ActivePage to get or set the active page in the control using its Caption.

Caption for the active page in the tabbed control.

ActivePage is a String property which holds the caption for the active page in the control.

The property value is retrieved using values in the PageIndex and Page properties, and contains the Caption property for the TCustomPage instance. The property value is an empty string ('') if PageIndex is not in the range 0..PageCount-1.

Setting a new value for the property causes the indexed Page property to be searched to locate the TCustomPage instance with a Caption matching Value. If a page is found with the specified caption, the SetPageIndex method is called to validate and store the PageIndex, and signal the OnChange event handler when configured in Options. No actions are performed if the new property Value is not used in Page.

A value assigned to ActivePage at design-time is not stored in the LCL component streaming mechanism.

Use ActivePageComponent to read or write the TCustomPage instance that is the active page in the control.

Use Tabs to access the internal page (or tab) list for the control.

TControl.Caption
Gets the value for the indexed Page property.
Value for the property.
Ordinal position for the page object requested in the method.
Gets the value for the PageCount property.
Value for the property.
Updates the control when the specified page is inserted into the page list.
Updates the control when the page at the specified position is removed from the page list.
Signals the OnChanging event handler prior to updates to PageIndex.
Always returns True.
Rectangular area used to display information for the tabbed control.

DisplayRect is a read-only TRect property which contains the display rectangle for the tabbed control. The property value contains the TRect instance returned from the TWinControl.GetClientRect method.

TWinControl.GetClientRect TRect
Contains the list of pages accessible in the tabbed control.

Tabs is a TStrings property which contains the list of pages for the tabbed control. It is created using the class reference from GetListClass in the constructor. By default, TNBPages is used as the class type for the page list. It is stored in an internal member, and used when TCustomPage class instances for the control are accessed and maintained.

Contains the ordinal position for the active Tab in the control.

TabIndex is an Integer property which contains the ordinal position for the active Tab in the tabbed control. It is the same as the PageIndex property; they read and write the same member value. The default value for the property is -1, and indicates that an active tab (page) has not been selected in the control.

Setting a new value for the property causes the OnChange event handler to be signalled when nboDoChangeOnSetIndex has been included in the Options for the control. The event handler is not signalled at design-time, during LCL component streaming, or when the control is freed.

No actions are performed in the method when the new property value is not in the range -1..PageCount-1, or when the new value is the same as the existing value.

Event handler signalled when the active page (or tab) for the control is changed.

OnChange is a TNotifyEvent property with the event handler signalled when the active page (or tab) for the control is changed. OnChange is enabled when the value nboDoChangeOnSetIndex has been included in the Options for the control.

Setting a new value in either PageIndex or TabIndex signals the assigned and enabled event handler. It is also called from the Change method when selection change messages are handled for the control, and when a tab is re-ordered using the MoveTab method.

Create
- constructor for TCustomTabControl: calls inherited Create creates a page list, then sets initial bounds and default values for local variables and properties.
TWinControl.Create
Owner of the class instance.
Destroy
- destructor for TCustomTabControl: clears and frees pages and list, then calls inherited Destroy.
TWinControl.Destroy TCustomControl.Destroy TComponent.Destroy
Gets the client rectangle for the control adjusted to the parent (when needed).
Gets the ordinal position for the image displayed on the tab for the specified page.

GetImageIndex is an Integer function used to get the ordinal position in Images for the image displayed on the specified tab. ThePageIndex contains the Page examined in the method to get its ImageIndex property. If Page does not have a TCustomPage instance at the position in ThePageIndex, -1 is used as the image index.

GetImageIndex signals the OnGetImageIndex event handler (when assigned) to allow a custom image index to be used in the return value.

GetImageIndex is called from methods in the widgetset class when the image displayed on a tab is needed.

Ordinal position in Images for the specified page index.
Ordinal position in Page with the image index for the tab.
IndexOf
- returns the index value of a specified page.
CustomPage
- returns the page specified by Index.
CanChangePageIndex
- determine whether it is permissible to change the index of the page.
GetMinimumTabWidth
- find the smallest permissible tab width.
GetMinimumTabHeight
- find the least permissible height for a tab.
GetCapabilities
- returns the set of capabilities.
Gets the real page index for the specified tab.

TabToPageIndex is an Integer function used to get the page index for the tab at the specified position. The tab index value in AIndex does not include any non-visible tabs. TabToPageIndex adjusts the index value to include any TCustomPage instances in Page with its TabVisible property set to False.

The return value contains the value specified in AIndex after adding any non-visible pages proper to the requested position.

No actions are performed in the method at design-time; all pages are visible on the designer surface.

Maps the LCL page to the tab index in the widgetset class.
DoCloseTabClicked
- perform the action associated with clicking the Close tab for this page (OnCloseTabClicked).
HotTrack
- the property whereby the item under the mouse pointer becomes emphasized.
Images
- the list of images associated with the pages of this notebook.
Width for the Images used in the control.

ImagesWidth specifies the width used for the Images in the control. ImagesWidth determines the resolution (either selected or resized) for the current display density (PPI).

Changing the value in the property causes the DoImageListChange method to be called to select the image resolution, and to notify the widgetset class of the change. The UpdateTabProperties method is called to propagate the change to all tabs in the control.

MultiLine
- whether the Tab's caption is allowed to have multiple lines.
MultiSelect
- whether multiple Tabs are allowed to be selected at the same time (e.g. by pressing Shift or Ctrl while selecting).
OnChanging
- event handler for changing a tab.
OnCloseTabClicked
- event handler for clicking on the Close button to close a tab.
OnGetImageIndex
- event handler for getting an image index.
The set of Options for the Notebook: Show close buttons on the tabs, multi-line tabs.

The set of Options for the Notebook:

nboShowCloseButtons (display a little Close Button on the Tab next to the label to allow a user to close that tab),

nboMultiLine (allows multi-line captions on the Tabs)

OwnerDraw
- is the calling routine (Owner) allowed to specify the drawing method?
The current Page of the Notebook.
PageCount
- the number of Pages in the Notebook.
PageIndex
- Index number of the current page.
The list of page names in the control.
RaggedRight
- un-justified or un-aligned text.
ScrollOpposite
- is scrolling to happen in the opposite direction to usual?
ShowTabs
- if True (default condition), show the tabs for each page.
Style
- Tabs, buttons or flat buttons?
TabHeight
- height of the tabs.
TabPosition
- top, bottom, left or right.
Width of the tabs displayed on the control.
Enables or disables navigation using the Tab key.

The default value for the property is True in TCustomTabControl.

TWinControl.TabStop
An individual page used in TPageControl.

TTabSheet - individual page of a TPageControl. It is a more elaborate version of TPage, and adds the following features:

- Drag/Drop properties
- Ability to Enable/Disable the page
- Ability to make the Tab visible or hidden

Using Multi-Page Controls How To Use Standard Controls
Gets the value for the PageControl property.
Value for the property.
Gets the value for the TabIndex property.
Value for the property.
Sets the value for the PageControl property.
New value for the property.
calls inherited Create and zeroes ImageIndex.
TComponent.Create
Destroy
- destructor for TTabSheet: detaches from the Host Dock Site and calls inherited Destroy.
TComponent.Destroy
The PageControl of which this TabSheet is a member.
TabIndex
- the Index value or sequence number of this TabSheet.
Indicates if the tab is visible in the Parent control.

TabVisible indicates if the Tab is visible in the Parent control. The default value for the property is True in TTabSheet.

Changing the value in the property cause the Parent control to be updated to reflect the new value. No actions are performed in the method at design-time, or when the property value is not different than the stored value.

When the Parent control has been assigned and has a handle allocated, the TCustomTabControl in Parent is updated to reflect the new value for the property. When True, the active page in the Parent control is changed to the current page instance if one has not already been assigned in the Parent. The page and its handle are removed from the Tab control when the property value is False.

Use IsControlVisible to determine if the page is currently the active page displayed in the Parent tab control.

TCustomPage.TabVisible
TPageControl
- provides a series of tabs along the edge of a multi-page component to allow selection of one of the pages (TTabSheet) of the component.

TPageControl provides a series of tabs along an edge of a multi-page component to allow selection of one of the pages (TTabSheet) defined for the component.

To use TPageControl, select its icon from the Common Controls tab of the IDE Component Palette and place it at the desired location on the Form.

Use the Form Designer and Object Inspector to adjust its shape, size, alignment, anchoring, docking and other properties, then select the object and right click with the mouse to bring up a pop-up menu whose first item is 'AddPage'. After you have added as many pages as you need, the individual pages can be edited by selecting ActivePage in the Object Inspector choosing the page required and editing its properties.

While a given page is selected, it is also possible to drop other controls (such as buttons, memo boxes etc) on to the page from the Component Palette.

Inherits most of its properties from TCustomTabControl

Using Multi-Page Controls
Clears the list of tab names of the control, and causes the associated tab sheets or pages to be freed.

By calling the Clear method of the protected Tabs property in the TCustomTabControl ancestor, this method removes all tab sheets from the PageControl. The TPageControl.PageCount is 0 afterwards.

Note, however, that the controls on the tab sheets are only destroyed when their Owner is one of the tabsheets. Otherwise they still exist on the form, but their Parent has been set to nil.

Gets the value for the ActivePageIndex property.
Value for the property.
Gets the value for the ActivePage property.
Value for the property.
Gets the value for the Pages property.
Value for the property.
Ordinal position for the page or tabsheet requested in the method.
Sets the value for the ActivePageIndex property.
New value for the property.
Sets the value for the ActivePage property.
New value for the property.
Finds the tabsheet in the Pages property which is the parent for the control specified in Client.
Gets the class type used to create a new tabsheet (or page) for the page control.
Class type used to create new instances of TPageControl.
DoAddDockClient
creates a new TabSheet in the PageControl, places the client on it and aligns it.
Client cannot be added to TPageControl itself but new TabSheet should be added and client placed onto it.
TWinControl.DoAddDockClient
Called to check whether this control allows docking and where.
DoRemoveDockClient
- frees the page which is being undocked.
TWinControl.DoRemoveDockClient
FindNextPage
- returns the next page (TTabSheet) in the sequence.
SelectNextPage
- checking that its tab is visible.

If GoForward is True, goes to next (higher index) page;

if False, goes to previous (lower index)

If CheckTabVisible is True, will only move if the tab is visible

Convenience routine used to make the TPageControl more intuitive to use.
Page class instance created in the method.
ActivePageIndex
- index value of currently selected (active) page.
Pages
- the actual Pages (TTabSheet) that comprise the component.
ActivePage
- the currently selected active page (TTabSheet).

ActivePage - the currently selected active page (TTabSheet).

Please note that the property is implemented with a type that differs from TCustomTabControl, where ActivePage is defined as a String.
OnChange
- Occurs immediately after a tab is selected.
Occurs immediately after a tab is selected.
TTabControlStrings
- the Strings that appear on the tabs of TTabControl.
GetTabIndex
- returns the Index value of the current Tab.
SetHotTrack
- specifies the status of HotTrack.
SetImages
- specifies the list of images to be used.
SetMultiLine
- specifies whether multi-line captions are used.
SetMultiSelect
- specifies whether MultiSelection is available.
SetOwnerDraw
- specifies whether an owner-derived drawing can be used.
SetRaggedRight
- specifies whether ragged-right (as opposed to right-justified) alignment is to be used.
SetScrollOpposite
- specifies whether scroll bars are to operate in the opposite sense to normal.
SetTabIndex
- specifies an index value for a tab.
Create
- constructor for TTabControlStrings: calls inherited Create then sets many local defaults.

Create is the constructor for TTabControlStrings. It calls the inherited Create method then sets default values in the class instance.

Among the defaults set are:

HotTrack, Multiline, MultiSelect, OwnerDraw, RaggedRight, ScrollOpposite - all False; Tab height and width to zero

TObject.Create
GetHitTestInfoAt
- returns the results of a hit test at the specified location X, Y.
Gets the size for the String displayed on a tab control.
IndexOfTabAt
- returns the Index value of the tab at the specified location X, Y.
RowCount
- number of rows (for a multi-row string).
TabRec
- returns the coordinates of the rectangle for the tab with specified index.
ImageListChange
- method for changing the image list.
ScrollTabs
- scrolls the tabs by an amount specified by Delta.
TabControlBoundsChange
- method for dealing with a change in the bounds of a Tab Control.
UpdateTabImages
- bring the tab images up to date.
BeginUpdate
increments the Update count.
TStrings.BeginUpdate
EndUpdate
decrements the Update count.
An exception is raised if the Update count is zero
TStrings.EndUpdate
IsUpdating
- returns True if in the process of updating.
The TabControl to which these strings apply.
TabIndex
- the index of the current Tab.
HotTrack
- the property whereby the item under the mouse pointer becomes emphasized.
TCustomListView.HotTrack
The list of Images associated with the Strings for these tabs.
MultiLine
- if True, multiple lines may be used in Tab strings.
MultiSelect
- if True, multiple tabs can be selected, for example by holding down Shift or Ctrl keys while selecting.
OwnerDraw
- if True, Owner object (or calling routine) can specify drawing methods.
RaggedRight
- if True, strings are un-justified or un-aligned with ragged right margin.
ScrollOpposite
- if True, scrolling proceeds in opposite direction to usual.
Implements the tabbed page control used in TNoteBookStringsTabControl.

TNoteBookStringsTabControl is a TPageControl descendant which implements the tabbed page control used in TNoteBookStringsTabControl.

Adjusts the specified coordinates to the ClientOrigin for the parent.

The adjustment amount is the difference between the ClientOrigin for the control and the ClientOrigin for the Parent of the control. The offset amounts are then applied to the values X and Y.

Called from the DragDrop, DragOver, MouseMove, MouseDown, and MouseUp methods.

Horizontal coordinate adjusted in the method.
Vertical coordinate adjusted in the method.
Gets the value for the PopupMenu property.

GetPopupMenu is an overridden TPopupMenu function which implements the read access specifier for the PopupMenu property. The return value contains the TPopupMenu instance from the Parent control when it is derived from TTabControl and Options contains the value nboHidePageListPopup. Otherwise, the inherited method in TControl is called to get the popup menu instance for the control.

TPopupMenu TControl.GetPopupMenu TControl.PopupMenu TControl.Parent
Value for the property.
Class type reference for TNoteBookStringsTabControl
TTabControlNoteBookStrings
- instance of TTabControlStrings for use with a TNoteBook.
Gets the value for the Style property.
Value for the Style property.
Sets the value for the Style property.
New value for the Style property.
Gets a new instance of a tab control
Get
returns the text string found on the indexed page.
TStringList
Gets the value for the Count property.

GetCount is an overridden method in TTabControlNoteBookStrings used to get the value for the Count property. In TTabControlNoteBookStrings, the property contains the value from the PageCount property in NoteBook.

TStrings.Count
Value for the Count property.
GetObject
returns the indexed object from the paged notebook.
TStrings.Objects
Gets the value for the TabIndex property.
Value for the TabIndex property.
Gets the value for the TabPosition property.
Value for the TabPosition property.
NBChanging
- method for dealing with the process for change in a NoteBook.
NBGetImageIndex
- obtains the Image Index associated with a given Tab Index in the NoteBook.
NBPageChanged
- Method for dealing with a NoteBook page that has changed.
Ensures that the bounds for the Tab control are updated when the handle for the class instance is created.

Implements an internal event handler assigned to the TNoteBookStringsTabControl instance for the class.

Put
writes the supplied string to the indexed page of the notebook.
TStringList
PutObject
stores the supplied object at the indexed place in the paged notebook.
TStrings.Objects
SetImages
- if the supplied ImageList is of correct type, stores it in the notebook Images area.
Sets the value for the MultiLine property.
New value for the MultiLine property.
Sets the value for the TabIndex property.
New value for the TabIndex property.
SetUpdateState
- if Updating is True, calls BeginUpdate; otherwise calls EndUpdate.
TStrings
Create
- constructor for TTabControlNoteBookStrings: calls inherited Create then sets some default Actions.

Create - constructor for TTabControlNoteBookStrings: calls inherited Create then sets some default Actions.

Among the actions set are: OnGetImageIndex, OnChanging, OnChange. Notebook is created with a nominated parent.

TObject.Create
Destroy
- destructor for TTabControlNoteBookStrings: frees NoteBook then calls inherited Destroy.
TStrings.Destroy
Clear
calls the Clear method for the client Notebook.
TStrings.Clear
Delete
calls the Delete method for the client NoteBook.
TStrings.Delete
Insert
calls the Insert method for the client NoteBook.
TStrings.Insert
Indicates the alignment and orientation for the tabs on the control.

TabPosition is a TTabPosition property which indicates how the Tabs on the control are aligned and oriented. The default value for the property is tpTop, and causes the tabs to align across the top of the client display area. The rise area for the control is also aligned to the top of the control.

Changing the property value causes the widgetset class to be updated.

Drawing style used for the tabs on the control.

Style is a TTabStyle property which controls the drawing style used for the tabs on the control. Read and write access to the property value is re-directed to the Style property in Notebook. The default value for the property is tsTabs, as set in the TCustomTabControl instance in NoteBook.

When a new value is assigned to the property, the TabControlBoundsChange method is called to re-calculate and apply the height and/or width for the tab control.

The tab control where the string values are displayed as the caption for the tabs.
TTabControl
- a series of Tabs along the edge of a display area; selection of a Tab governs the contents of the DisplayRect.

TTabControl - a series of Tabs along the edge of a display area; selection of a Tab governs the contents of the DisplayRect

Use TTabControl by selecting its icon from the Common Controls tab of the IDE Component Palette and placing it at the desired location on the Form. Use the Form Designer and Object Inspector to adjust its shape, size, alignment, anchoring and other properties. Tabs can be added or removed from the component by selecting it, then right-clicking with the mouse to get a pop-up menu whose first item is 'Add Tab'. Once created, the Tabs can be edited by selecting the Tabs entry in the Object Inspector and selecting the ellipsis (...) which will cause a pop-up String editor to appear. The tabs can be given new captions, moved up and down the list or removed altogether as required.

Each Tab has an Index (starting from 0) and this index can be used to specify an entry from Images for display in the DisplayRect.

Using Multi-Page Controls
Adjusts the display rectangle to reserve space for an internal border drawn on the control.
Gets the value for the DisplayRect property.
Value for the property.
Gets the value for the HotTrack property.
Value for the property.
Gets the value for the MultiLine property.
Value for the property.
Gets the value for the MultiSelect property.
Value for the property.
Gets the value for the OwnerDraw property.
Value for the property.
Gets the value for the RaggedRight property.
Value for the property.
Gets the value for the ScrollOpposite property.
Value for the property.
Gets the value for the TabIndex property.
Value for the property.
Gets a rectangle with the space reserved for the tabs on the control including border space.
Gets the value for the TabStop property.
Value for the property.
Sets the value for the HotTrack property.
New value for the property.
Sets the value for the Images property.
New value for the property.
Sets the value for the MultiLine property.
New value for the property.
Sets the value for the MultiSelect property.
New value for the property.
Sets the value for the OwnerDraw property.
New value for the property.
Sets the value for the RaggedRight property.
New value for the property.
Sets the value for the ScrollOpposite property.
New value for the property.
Sets the value for the Style property.
New value for the property.
Sets the Height for tabs displayed on the control.

SetTabHeight is used to set the height for the tabs displayed on the control to the value in AValue. SetTabHeight calls GetCapabilities to determine if the value nbcTabsSizeable is included in the capabilities for the control. No actions are performed in the method when nbcTabsSizeable is not present in the controls capabilities list.

SetTabHeight propogates the new tab height to the Notebook which contains the Tabs in the control.

New height for the tabs displayed on the control.
Sets the value for the TabPosition property.
New value for the property.
Sets the value for the Tabs property.
New value for the property.
Sets the value for the TabStop property.
New value for the property.
Sets the value for the TabWidth property.
New value for the property.
Registers the class type with the widgetset.

WSRegisterClass is an overridden class procedure used to register the widgetset class used to create new instances of the class. WSRegisterClass calls the inherited method, and calls RegisterPropertyToSkip to omit the OnDrawTab property when the component is loaded at run-time. OnDrawTab was used in an older version of the LCL.

Sets the value for the Options property.
New value for the property.
Not implemented in TTabControl. Page handles are not used.

An empty implementation in TTabControl; there are no pages, so no handle is required.

Indicates whether the tab control can update its Tabs property.

Signals the OnChanging event handler (when assigned) to get the return value for the method. The default return value is True when OnChanging has not been assigned.

True if the Tabs for the control can be modified.
Indicates if the control can show the tab at the specified position.

Always returns True in TTabControl.

Always returns True in TTabControl.
Ordinal position for the requested tab.
Changes the active tab for the control.

Change is an overridden method in TTabControl. It re-implements the method from the ancestor class to signal the OnChange event handler (when assigned) to change the active tab for the control. An internal flag is used to determine if a previous call to OnChange has not been completed. No actions are performed in the method when the flag is set.

Change does not call the inherited method.

Handles the notification when a component is added to or removed from the class instance.

Notification is an overridden method in TTabControl, and calls the inherited method on entry. It ensures that the Images member is set to Nil when the component is removed from the class instance.

Component for the notification.
Operation performed for the component.
Sets the value for the DragMode property.

SetDragMode is an overridden method in TTabControl used to set the value for the DragMode property. It calls the inherited method on entry, and copies the new property value to the Tabs property.

TControl.SetDragMode TControl.DragMode
Sets the value for the TabIndex property.
New value for the property.
Calls the corresponding method in Tabs.

Calls the corresponding method in Tabs.

Calls the corresponding method in Tabs.

Calls the corresponding method in Tabs.

Object (TCustomTabControl) for the event.
Updates the bounds for the control to the specified values.

DoSetBounds is an overridden method in cv TTabControl. It calls the inherited method in entry to adjust the client rectangle for the control and its control flags. Calls the TabControlBoundsChange method in the Tabs property when it has been assigned.

TWinControl.DoSetBounds
New value for the Left property.
New value for the Top property.
New value for the Width property.
New value for the Height property.
Gets the default size for new instances of the class.

GetControlClassDefaultSize is an overridden TSize class function used to get the dimensions for a new instance of the TTabControl class. The return value contains the Width (CX) and Height (CY) for the class instance.

The default size in TTabControl is 200 pixels (width) by 150 pixels (height).

TSize instance with the dimensions for the new class instance.
Updates the canvas handle and paints the control.

PaintWindow is an overridden method in TTabControl. It ensures that the specified device context matches the Handle for the control canvas. When they differ, the value in DC is temporarily used as the canvas handle. The modified canvas handle is reset prior to exiting from the method.

PaintWindow calls the Paint method to render the control using the theme elements details available for a tab control. PaintWindow is called when a paint message is received and applied in the PaintHandler method.

PaintWindow re-implements the method from the ancestor class, and does not call the inherited method.

TWinControl.PaintWindow
Device context for the control canvas.
Paints the control to its Canvas using theme services.

Paint is a method used to render the tab control to its canvas. It handles the background and tabs for the control excluding any button decorations. Buttons are handled in a differ component. Paint adjusts the display rectangle in ARect to reserved a single pixel on the edge indicated in the TabPosition property. This avoids drawing a border on the edge where the control is aligned.

Paint uses ThemeServices to get theme elements available for a tab control, and to draw the control to its Canvas using the theme details. A raised 3D frame is drawn around the control. At design-time, the Caption for the control is drawn centered in its display area.

TControl.Caption
Adjust the specified display rectangle to use the size in Tabs.
Calls the AdjustDisplayRect method.
Creates the TTabControlNoteBookStrings instance used in Tabs.
TTabControlNoteBookStrings instance created in the method.
Constructor for the class instance.

Create is the overridden constructor for the class instance. Create calls the inherited constructor, and sets the default values for the following properties in the class instance:

- Tabs
- TabStop
- BorderWidth

Create calls GetControlClassDefaultSize and sets the initial bounds for the control using SetInitialBounds. Create allocates a TControlCanvas instance that is used in the Canvas property.

Owner of the class instance.
Destructor for the class instance.

Destroy is the overridden destructor for the class instance. Destroy ensures that resources allocated in the class instance are freed, including:

- Buttons (and the associated toolbar)
- Internal ImageChangeLinks

Destroy calls the inherited destructor prior to exiting from the method.

Gets the position for the tab at the specified mouse coordinates.

IndexOfTabAt is an overridden overloaded Integer function used to get the position for the tab at the specified mouse coordinates. The overloaded variants allow the mouse coordinates to be specified as a TPoint instance, or two Integer values.

IndexOfTabAt re-implements the methods from the ancestor class to use the TTabControlNoteBookStrings instance in Tabs. Tabs provides the offset for the control from the value in ClientOrigin. The IndexOfTabAt method in Tabs is called to get the return value for the method.

The return value contains the ordinal position in Tabs where the mouse pointer is located.

Ordinal position for the hovered tab in the Tabs property.
Horizontal coordinate for the mouse pointer.
Vertical coordinate for the mouse pointer.
TPoint instance with the mouse coordinates.
Gets a set of hit test results for the specified mouse coordinates.
Signals the OnGetImageIndex event handler to get an image for the specified tab index.
Gets the ordinal position for the tab with the specified Caption.
Gets the rectangle where the tab at the specified position is drawn.
Gets the number of rows needed to render the Tabs on the control.
Always returns 1 in TTabControl.
Scrolls the tabs on the control horizontally by the value specified in Delta.
Starts an update process for the control.

No actions are performed in the method if the Tabs property has not been assigned.

Calls the BeginUpdate method in Tabs to start the update process.

Finishes an update process for the control.

No actions are performed in the method if the Tabs property has not been assigned.

Calls the EndUpdate method in Tabs to complete the update process. The Change method is called when there no unfinished updates in Tabs and an internal flag is set to trigger the OnChange event handler.

Indicates if there are unfinished updates for one of the Tabs on the control.
Display area for the tab control.

DisplayRect is a read-only TRect property which contains the display area for the page in the tabbed control. It uses the client rectangle for the control as the value for the property. Use TabRect to get the display area for the tab in the tabbed control.

TCustomDrawTarget
- enumerated type controlling how a target object is drawn.
Draw the entire control.
Draw one item (or line in report mode).
Draw one subitem (except subitem 0 which is drawn by dtItem).
TCustomDrawStage
a series of constants to define the drawing stages.
TCustomDrawStateFlag
- series of flags to define the DrawState.

TCustomDrawStateFlag is an enumerated type with values representing the drawing states available in custom-drawn controls. Values from the enumeration are stored in the TCustomDrawState set type passed as an argument to event handlers in list view and tree view controls, and stored internally in the controls.

Control is drawn using the selected style.
Control is drawn using the grayed or unselected style.
Control is drawn using the disabled style.
Control is drawn using the checked style.
Control is drawn using the focused style.
Control is drawn using the default style.
Control is drawn using the hot tracking style.
Control is drawn using the marked (multiselected) style.
Control is drawn using the indeterminate state style.
TCustomDrawState
- set of TCustomDrawStateFlag.
. TCustomDrawState determines how a item will be drawn.
TCustomDrawResultFlag
- enumerated type, a series of flags to signify the result of a drawing process.
TCustomDrawResult
- set of TCustomDrawResultFlag.
.
Indicates the sort mechanism used for items in tree view and list view controls.

TSortType is an enumerated type with values indicating the sort mechanism used for items in tree view or list view controls. TSortType is the type used to implement the SortType property in both TCustomTreeView and TCustomListView.

Sorting is not used for list items.
List items are sorted by their data and not their display text.
List items are sorted by their display text and not their data.
List items are sorted using both display text and data.
Represents state values for items in a list view control.

TListItemState is an enumerated type with values which represent the state for items in a list view control. The values reflect the current settings for properties in TListItem.

Values from TListItemState are stored in the TListItemStates set type.

The list item has its Cut property set to True.
The list item has its DropTarget property set to True.
The list item has its Focused property set to True.
The list item has its Selected property set to True.
Set type used to store value(s) from the TListItemState enumeration.

TListItemStates is a set type used to store zero or more values from the TListItemState enumeration. TListItemStates is the type used to implement the States member in TListItem. Values are included in and excluded from the set when the corresponding properties in TListItem are changed.

TListItemFlag
- enumerated type, a flag denoting a list item is being destroyed or created.
List item has been marked for destruction by a notify message.
List item has been marked as created by a notify message.
Set type used to store TListItemFlag enumeration values.

TListItemFlags is a set type used to store zero or more values from the TListItemFlag enumeration. It is the type used to implement the internal Flags member in TListItem.

TDisplayCode
- enumerated type denoting how items are displayed.

TDisplayCode is an enumerated type with values that denote how the item or subitem is displayed in a list view control. The values are passed as arguments to the DisplayRect and DisplayRectSubItem methods in TListItem, and allows the widgetset to layout and rendering the list items for the platform.

List item is rendered using the Bounds for the item display rectangle.
List item is rendered using the width and height for the associated image.
List item is rendered using the text metrics for the caption in the item.
List item is rendered using the selection rectangle for the item.
Represents icon arrangement options in a list view control.

TIconArrangement is an enumerated type with values representing the icon arrangement options for a list view control.

Icons are arranged from the top to the bottom, then left to right in the control.
Icons are arranged from left to right, then top to bottom in the control.
Contains text wrapping and icon layout settings for a list view control.

TIconOptions is a TPersistent descendant which represents the text wrapping and icon layout settings in the IconOptions property in TCustomListView.

Gets the value for the AutoArrange property.
Value for the property.
Gets the value for the WrapText property.
Value for the property.
Sets the value for the Arrangement property.
New value for the property.
Sets the value for the AutoArrange property.
New value for the property.
Sets the value for the WrapText property.
New value for the property.
Assign values from the class instance to the specified persistent object.

AssignTo is an overridden method which implements support for the TIconOptions type in the RTL object persistence mechanism. AssignTo allows property values from the current class instance to the stored to the persistent object in Dest.

When Dest is a TIconOptions instance, AssignTo copies the values from the current class instance:

- Arrangement
- AutoArrange
- WrapText

If ADest is not derived from TIconOptions, the inherited method is called.

TPersistent.Assign
Persistent object where property values are stored.
Gets the owner of the class instance.

GetOwner is an overridden method in TIconOptions used to get the owner of the class instance. It returns the TCustomListView instance passed as an argument to the Create constructor.

TPersistent
Owner of the class instance.
Constructor for the class instance.

Create is the overridden constructor for the class instance, and calls the inherited constructor on entry. Create stores the value in AOwner to an internal member used in the class instance, and sets the default value for the Arrangement property to iaTop.

Owner of the class instance.
Indicates the icon position relative to the caption in a list item.

Arrangement is a TIconArrangement property which indicates the layout for the icon or image in a list item relative to its caption text. The default value for the property is iaTop, and causes the icon to be displayed above the caption for the list item.

See TIconArrangement for other values in the enumeration and their usage.

Indicates whether icons in a list view can be automatically arranged.

AutoArrange is a Boolean property which indicates if icons in a list view control can be automatically arranged when items are added to the control. The default value for the property is False.

AutoArrange is used when the list view uses the vsIcon or vsSmallIcon view styles.

Indicates if the caption for a list item can wrap into multiple lines.

WrapText is a Boolean property which indicates if the Caption for a list view item can be wrapped into multiple lines. The default value for the property is True.

The Caption for the item is wrapped when its length exceeds the width for the icon in the list item.

Represents the items created in TCustomListView and descendants.

TListItem is the base class for the Items created in TCustomListView and TListView.

TListItem provides properties which identify the content for the list item, like: Caption, SubItems, Data, Index, ImageIndeex, and StateIndex. Other properties indicate the disposition of the item in the control, like: Checked, Cut, DropTarget, Focused, and Selected.

Methods are provided that allow the list item to interact with the control and the widgetset class.

TListItem is the type used in the TListItems container.

TPersistent TObject
Gets the value for the Caption property.
Value for the property.
Gets the value for the Check property.
Value for the property.
Gets the value for the Left property.
Value for the property.
Gets the value for the ListView property.
Value for the property.
Gets the value for the Position property.
Value for the property.
Gets the value for a state property in the list item.
Value for the property.
TListItemState enumeration value which identifies the property value returned from the method.
Gets the value for the ImageIndex property.
Value for the property.
Gets the value for the Index property.
Value for the property.
Gets the value for the StateIndex property.
Value for the property.
Gets the value for the indexed SubItemImages property.
Value for the indexed property.
Ordinal position for the sub-item image in the property value.
Gets the value for the SubItems property.
Value for the property.
Gets the value for the Top property.
Value for the property.
Sets the value for the Checked property.
New value for the property.
Sets the value for the property identified by the AState argument.
TListItemState value which identifies the property updated.
New value for the property.
Sets the value for the Data property.
New value for the property.
Sets the value for the ImageIndex property.
New value for the property.
Sets the value for the Left property.
New value for the property.
Sets the value for the Caption property.
New value for the property.
Sets the value for the Position property.
New value for the property.
Sets the value for the StateIndex property.
New value for the property.
Sets the value for the indexed SubItemImages property.
Ordinal position for the new value.
New value for the indexed property.
Sets the value for the SubItems property.
New value for the property.
Sets the value for the Top property.
New value for the property.
Determines if the specified list item has the same values as the current class instance.

IsEqual is a Boolean function used to determine if the list item has the same values as the list item specified in AItem. IsEqual compares the values in the Caption, Data, and the internal FStates member in both TListItem instances. The return value is True when the content in the instances is the same.

True when the list items have the same content.
List item compared to the current class instance.
Determines if the list item has an owner with a valid handle.

IsOwnerData is a Boolean function used to determine if the list item has an owner with a valid handle. IsOwnerData always returns False in TListItem. It is overridden in descendent classes like TOwnerDataListItem.

True if the list item has an owner with a valid handle.
True if the member variable for the Checked property contains True.

Used in methods in the widgetset class.

Gets the owner of the class instance.

Returns the value in the Owner property.

TPersistent
Owner of the class instance.
Copies values from the specified persistent object into the current class instance.

Assign is an overridden method used copy property values from the persistent object in ASource into the current class instance. When ASource is a TListItem descendant, the following property values are copied:

- Caption
- Data
- ImageIndex
- SubItems

If ASource is not descended from TListItem, the inherited method is called to handle the assignment.

TPersistent.Assign
Persistent object with values copied in the method.
Constructor for the class instance.

Create is the constructor for the class instance, and calls the inherited constructor on entry. AOwner is the TListItems instance which acts as the container for the list item.

Create sets the default values in member variables used in the class instance. The property interfaces are not used before they are not available until the list item is added to the TListItems container.

TObject.Create
Container which owns the list item.
Destructor for the class instance.

Destroy is the overridden destructor for the class instance.

Destroy sets the internal flag that marks the list item for destruction in the Owner. When the Owner is assigned, its ItemDestroying method is called to signal destruction of the list item in the container.

Destroy free and Nils resources allocated for the SubItems property, and calls the inherited destructor prior to exit.

TPersistent.Destroy
Removes the list item from the container.
Makes the item visible in the list view control which owns the container and the list item.
True is the list item can be partially visible in the control.
DisplayRect
- returns the coordinates of a rectangle for displaying the current item.

DisplayRect - returns the coordinates of a rectangle for displaying the current item.

Display codes can be: drBounds, drIcon, drLabel, drSelectBounds.

DisplayRectSubItem
- returns the coordinates of a display rectangle for a specified sub-item.

DisplayRectSubItem - returns the coordinates of a display rectangle for a specified sub-item.

Display codes can be: drBounds, drIcon, drLabel, drSelectBounds.

Makes the item the selection in the list view control and displays the editor when allowed.
True if the control is not ReadOnly and the editor is valid, otherwise False.
Returns all the states for the list item.

GetStates is a TListItemStates function used to get the state values for an item in a list view control. The state values are retrieved using methods in the widgetset class for the TCustomListView control which owns the list item. If the widgetset class does not return the values, the return value contains the existing values in the States member for the TListItem instance.

State values for the list item.
Caption
- the name given to this item on the list.
Checked
- if True, a check mark is present beside the item implying it has been selected.
Cut
this item from the list (but it can be placed on the clipboard).
Pointer to the Data associated with this item.
DropTarget
- returns True if this is a valid target on the list for dropping.
Property is true if this item has Focus.
The index of this item in the list (integer).
The index of the image associated with this Item in the list.
The position of the Left side of the list item.
The ListView in which this Item is found.
The Owner of the ListItem.
The coordinates of the position where the ListItem is located.
Whether this Item has been Selected (often denoted by a check-mark).

Selected is a Boolean property which indicates if the list item has been selected. The property value is determined by examining the internal TListItemStates set for the class instance. When lisSelected has been included in the state values, the property is True. Otherwise, the property is False.

Setting a new value for the property causes the value lisSelected to be included in or removed from the internal set. AIsSet indicates whether the state value is set. When True, the state value is included in the set. Otherwise, the state value is excluded.

Ordinal position for the image used to represent the state for the list item.
The list of SubItems associated with this ListItem.
SubItemImages
- the list of Images associated with the SubItems.
The position of the Top of this ListItem.
Class reference used to create new instances of TListItem.
List item used in a list view control when owner data (virtual) mode is enabled.

TOwnerDataListItem is a TListItem descendant which implements a list item used for a list view control in virtual mode.

True if the owner for the list item has been assigned and can be updated in the widgetset class.
Sets the internal index position for the virutal item.
Sets the TListItems container which owns the list item.
Implements an enumerator for TListItem values in a TListItems container.
Constructor for the class instance.
List items navigated in the enumerator.
Moves to the next value for the enumerator.
Current value for the enumerator.
Widgetset flags applied to the TListItems container.
Set type used to store TListItemsFlag enumeration values.
TListItems
- a list of items with a cache of the last accessed item.
TListitems
has a built-in cache for the last accessed item. This will speed up interface updates since Item.Index is often used for the same item updating more properties. If FCacheIndex contains -1 then the cache is not valid.
Reads data in a Delphi compatible way.
Reads data in a 64-bit safe way.
Writes data in a 64-bit safe way.
DefineProperties
- calls inherited method, then defines some specific binary properties.
TPersistent
GetCount
- find the number of Items in the list.
GetItem
returns the ListItem specified by AIndex.
.
Gets the owner of the persistent object.
TCustomListView instance that owns the list items.
WSCreateItems
- instruction to the widgetset to create Items.
Updates flags in the class instance when the widgetset handle is freed.
Sets the value for the Count property.
New value for the Count property.
SetItem
- writes the Index and content of a given Item to a local variable.
Clears the selected state for all TListItem instances in the class.
Sets the selected state for all TListItem instances in the class.
Add
an Item to the Collection.
AddItem
- add the specified AItem to the collection.
BeginUpdate
- start the update process.
Clear
- remove all Items from the list.
Create
- constructor for TListItems: calls inherited Create then creates the list.
TObject.Create
Destroy
destructor for TListItems: frees the individual items on the list, then calls inherited Destroy.
. TPersistent.Destroy
Remove the Item specified by AIndex from the collection.
EndUpdate
- finish the update process.
Exchanges the list items stored at the specified positions.
Moves the list item at the specified position to a new position in the list.
FindCaption
- returns the ListItem with the specified caption at the given starting place.
FindData
- returns the ListItem associated with the specified data pointer.
Gets an enumerator for the Item values in the list.
Gets the ordinal position in the list for the specified list item.
Insert
an item in the list at AIndex, returning the value of the ListItem.
InsertItem
- procedure to insert AItem at position AIndex in the list.
Contains the flag values currently assigned to the list.

Flags is a read-only TListItemsFlags property with the flag values currently assigned to the list. Values in flags are added and removed as needed in methods for the class instance.

Count
- the number of items in the collection.
An Item in the list, specified by its Index value.
Owner
- the ListView that owns this collection of ListItems.
Faux container for the items in a list view control when owner data (virtual) mode is enabled.

Only the most recent list item is actually populated in the list view control when owner data is enabled.

Gets the value for the Count property.
Value for the Count property.
Sets the value for the Count property.
New value for the Count property.
Gets the value for the indexed Item property.
Value for the property.
Ordinal position for the indexed property value.
Frees the list items stored in the Items property.
ImageIndex.
TWidth is an Integer range type. Range is 0..MaxInt.
Represents the sort indicators available for a column in a list view control.

TSortIndicator is an enumerated type with values that represent the sort indicators available in the TListColumn class. TSortIndicator is the type used to implement the SortIndicator property in TListColumn.

No sort indicator is used for the list column.
Uses an ascending sort indicator for the list column.
Uses a descending sort indicator for the list column.
Represents an individual column in a multi-column list control.

TListColumn is a TCollectionItem descendant which represents an individual column in a multi-column list control.

TListColumn is the type used for items added to the TListColumns collection, and maintained in the TCustomListView.Columns property.

TCollectionItem
Sets the value for the Index property.

Calls the inherited method to move the collection item to the position indicated in the property value. Calls the ColumnMove method in the widgetset class to reorder the column in the control.

TCollectionItem.Index
New value for the Index property.
Gets the value for the DisplayName property.

GetDisplayName returns the Caption for the control, and when blank, calls the inherited method to the property value.

TCollectionItem.DisplayName
Value for the DisplayName property.
Gets the value for Width as included in LCL component streaming.
Returns the value in the Width property.
Constructor for the class instance.

Create is the constructor for TListColumn, and sets the default values for properties, including:

- Alignment
- Caption
- Width
- Visible
- MinWidth
- MaxWidth
- AutoSize
- Tag
- ImageIndex

Create calls the inherited Create method to instantiate the class instance and assign the value in ACollection as the owner for the class instance.

TCollectionItem.Create
Destructor for the class instance.

Destroy is the destructor for TListColumn. When the collection allows updates, the update is suppressed for the column instance that is being destroyed. Calls the inherited method to clear the owner for the collection item and destroy the class instance. The columnDelete method in the widgetset class is called to remove the column.

TCollectionItem.Destroy
Copies properties from the specified persistent object to the current class instance.

Assign is an overridden method used to implement object persistence for the TListColumn type. It copies property values from the persistent object in ASource into the current class instance. When ASource is derived from TListColumn, the following properties are copied:

- Alignment
- AutoSize
- Caption
- MaxWidth
- MinWidth
- Visible
- Width

The Changed method is called to signal a change in the values for the collection item.

If ASource is not derived from TListColumn, the inherited method is called using ASource as an argument. An EConvertError exception is raised if ASource has not been assigned (contains Nil).

TPersistent.Assign
Not used in LCL.

WidthType is a read-only TWidth property. Provided for VCL code compatibility.

Sets the horizontal alignment for the Caption text.

Left or right justified, or centered.

When other columns have fixed width, auto-calculate width of this column, to fill entire width.
Caption text for the column.
Index of icon, inside ImageList object for columns of Listview.
Maximal width for this column.
Minimal width for this column.
Int value, to store some info for this column.
Allow to show this column.
Current width of column. May be calculated auto, if AutoSize used.
Sort indicator for the column. Reflects the sort direction for the list view control where the column is used.
TListColumns
- a collection of Items of type TListColumn (the columns appearing in a multi-column list).
Gets the owner of the persistent object.
TPersistent object instance that owns the collection.
Create
- constructor for TListColumns: sets ownership then calls inherited Create.
TCollection.Create
Destroy
- destructor for TListColumns: calls inherited destructor.
TCollection.Destroy
Update
checks if update is in fact required, then calls inherited method.
TCollection
Add
calls inherited method, then adjusts state flags.
TCollection.Add
Owner of the collection instance.

Owner is a read-only TCustomListView property which contains the control that is the owner of the column collection. Its value is set to the argument passed to the Create constructor.

Provides indexed access to the items in the column collection.

Items is the default property for the collection, and the target for an enumerator used with the class instance.

TCollection.Items
Ordinal position for the indexed property value.
Assign
checks that source is of correct type, then adds new columns and copies items from source into them; otherwise calls inherited Assign which probably raises an exception.
TCollection.Assign
TItemChange
- enumerated type for kind of change: in text, in image or in state.
Represents the view styles available for the items in a list view control.

TViewStyle is an enumerated type with values representing the view styles available for the items in a List View control. TViewStyle is the type used for the ViewStyle property in TCustomListView.

Displays a large icon and the caption for each list view item. The icon is centered above the caption text.
Displays a small icon and caption text for each list view item. Caption text on the right-hand side of the icon.
Displays a small icon with caption text to its right-hand side. The list items are arranged in columns.
Displays a each list item as a series of columns with a small icon on the left-hand side of the row. Each columns has a header at the top of the list view control.
Represents a search mechanism used to locate the data for a list view item.

TItemFind is the type passed as an argument to TLVDataFindEvent and used to implement the OnDataFind event handler in TCustomListView.

Not used in the current implementation.
Not used in the current implementation.
Not used in the current implementation.
Not used in the current implementation.
Represents search direction used to locate the list view item nearest to given coordinates.

Values from TSearchDirection are passed as an argument to the GetNearestItem method in TCustomListView.

Searches to the left of the specified list view coordinates.
Searches to the right of the specified list view coordinates.
Searches above the specified list view coordinates.
Searches below the specified list view coordinates.
Searches in all directions for the list view closest to the given coordinates.
Event handler signalled when a property value for a list view item is changed.

TLVChangeEvent is an object procedure which specifies an event handler signalled when a property value for a list view item is changed. Arguments passed to the method identify the list view control, the list view item, and the specific property for the event notification.

TLVChangeEvent is the type used for the OnChange property in TCustomListView.

Object instance (TCustomListView) for the notification.
List item for the notification.
Indicates the property value that was changed in Item.
Not used in the current LCL implementation.
Not used in the current LCL implementation.
Not used in the current LCL implementation.
TLVColumnClickEvent
- generic event handler method for a click on a List View column.
TLVColumnRClickEvent
- generic event handler method for a right click on a List View column.
Specifies a routine used to compare the values in two items in a list view control.

TLVCompare is a routine used to determine the relative sort order for the list items passed in the Item1 and Item2, and allows an optional Integer parameter value used in the comparison. The return value is the relative sort order for the TListItem instances. For example:

-1
  Item1 comes before Item2 in the sort order.
0
  Item1 and Item2 have the same sort order value.
1
  Item1 comes after Item2 in the sort order.

A TLVCompare type is passed as an argument to the CustomSort method in TCustomListView.

Relative sort order for the specified list items.
First list item for the comparison.
Second list item for the comparison.
Pointer to an optional Integer value used in the comparison.
TLVCompareEvent
- generic event handler method for List View comparison.
TLVDeletedEvent
- generic event handler method for deleted items in List View.
Specifies an event handler signalled when an edit action is started for an item in a list view control.
Specifies an event handler signalled when an edit action is completed for an item in a list view control.
TLVInsertEvent
- generic event handler method for List View insertion.
Alias to the TLVDeletedEvent type.
Specifies an event handler signalled when the checked state for an item in a list view control has been changed.
TLVSelectItemEvent
- generic event handler method for List View selection.
TLVCustomDrawEvent
- generic event handler method for List View custom drawing.
TLVCustomDrawItemEvent
- generic event handling method for List View item drawing.
TLVCustomDrawSubItemEvent
- generic event handling method for List View subitem drawing.
Specifies an event handler signalled to draw an item in a list view control.
TLVAdvancedCustomDrawEvent
- generic event handling method for List View custom drawing.
Specifies an event handler signalled to perform advanced custom drawing for a list view item with stage and state information.
TLVAdvancedCustomDrawSubItemEvent
- generic event handling method for List View custom subitem drawing.
Specifies an event handler signalled to get the class type needed to create a new list view item.

Arguments to the object procedure identify the list view control (Sender) and the class type (ItemClass) used to create new list view items. ItemClass is a variable parameter which is updated in the event handler with the TListItemClass class reference needed for the list view control.

TLVCreateItemClassEvent is the type used for the OnCreateItemClass property in TCustomListView.

Object (TCustomListView) for the event notification.
Class for the new list view item.
Represents Boolean properties used in TCustomListView.

TListViewProperty is an enumerated type with values representing Boolean properties used in TCustomListView.

Values from the enumeration are included in or excluded from the TListViewProperties set type. When a value is included in the set, the corresponding Boolean property has been set to True. When a value is excluded from the set, the corresponding Boolean property has been set to False.

Represents the AutoArrange property in TCustomListView.
Represents the CheckBoxes property in TCustomListView.
Represents the ColumnClick property in TCustomListView.
Represents the FlatScrollBars property in TCustomListView.
Represents the FullDrag property in TCustomListView.
Represents the GridLines property in TCustomListView.
Represents the HideSelection property in TCustomListView.
Represents the HotTrack property in TCustomListView.
Represents the MultiSelect property in TCustomListView.
Represents the OwnerDraw property in TCustomListView.
Represents the ReadOnly property in TCustomListView.
Represents the RowSelect property in TCustomListView.
Represents the ShowColumnHeaders property in TCustomListView.
Represents the ShowWorkAreas property in TCustomListView.
Represents the WrapText property in TCustomListView.
Represents the ToolTips property in TCustomListView.
Set type used to store values from the TListViewProperty enumeration.

TListViewProperties is a set type used to store zero or more values from the TListViewProperty enumeration.

The set represents Boolean property values found in TCustomListView / TListView. When a value is included in the set, the corresponding property in TCustomListView has been set to True. The value is excluded from the set when the corresponding property in TCustomListView is set to False.

TListViewProperties is the type used to implement the internal FProperties member in TCustomListView.

Represents the image list sizes used in TCustomListView.

TListViewImageList is an enumeration type with values that represent image list sizes used in TCustomListView.

Represents the SmallImages property in TCustomListView.
Represents the LargeImages property in TCustomListView.
Represents the StateImages property in TCustomListView.
Represents cursor shapes displayed during hot tracking in a control.

TListHotTrackStyle is an enumerated type with values for cursor shapes displayed for the "hot tracking" state in a TCustomListView control. Hot tracking occurs when the mouse pointer hovers over an item in a control, and it is highlighted (aka hot-lighted). Values from TListHotTrackStyle are stored in the TListHotTrackStyles set type used for the TCustomListView.HotTrackStyles property.

For current ListView item, show the HandPoint mouse cursor.
For current ListView item, show the pale underline.
For current ListView item, show the bold underline.
Set type used to store values from TListHotTrackStyle.

TListHotTrackStyles is a set type used to store zero or more values from the TListHotTrackStyle enumeration. TListHotTrackStyles is the type used to implement the TCustomListView.HotTrackStyles property.

Represents flag values used in TCustomListView when sorting or validating items in the control.
The value in the Selected property is valid.
Items in the control are being moved.
Items in the control are being sorted.
Sort parameters are being prepared.
Set type used to store values from the TListViewFlag enumeration.

TListViewFlags is the type used to implement the internal flags for the TCustomListView control.

Represents the sort directions used for items in a list view control.
Sorts list items in ascending order.
Sorts list items in descending order.
Provides multi-platform editing capabilities for a list view control.

Used to provide multi-platform editing capabilities for TCustomListView. It implements the internal editor control in TCustomListView.

Implements the OnKeyDown event handler for the editor control.

Ensures that the VK_ESCAPE and VK_RETURN virtual key codes are handled for the editor. VK_ESCAPE causes the editor to be hidden, and focused is returned to the parent control. VK_RETURN does not hide the editor, but focus is returned to the parent control. In both cases, Key is set to 0 to indicate that the key was handled in the method.

TWinControl.OnKeyDown
Object for the event notification.
Virtual key code examined in the method.
Shift / Ctrl / Alt modifier for the key code.
Performs actions needed when the editor loses focus.

Calls the HideEditor method in the parent control (TCustomListView). Calls the inherited method prior to exit.

Constructor for the class instance.
Create is the overridden constructor for the class instance, and calls the inherited method on entry.
List item updated in the editor control.

Item is a TListItem property with the list item updated in the editor control. The value in Item is assigned in the ShowEditor method in the parent control (TCustomListView). Item is set to Nil when the editor control is hidden.

TCustomListView
is the base class for TListView.

TCustomListView is the base class for TListView. It provides a multi-platform implementation of the List View control from the Windows API. TCustomListView allows a collection of items to be displayed using different view styles. For instance:

Icon View
  Each list item has an large icon with a caption.
Small Icon View
  Each list item has a small icon with a caption.
List View
  Each list item has a small icon with a caption, and is displayed in a single column in the control.
Report View
  Each list item is displayed on a single line, with sub-items displayed as additional columns. The first column has a small icon and a caption. Other columns contain the text for the sub-items.

TCustomListView does not implement some features available for Windows version 6 or higher, including: the Tile View style, List View Item Grouping, and List View Work Areas.
Gets the value for the BoundingRect property.
Value for the property.
Gets the value for the ColumnCount property.
Value for the property.
Gets the value for the indexed Column property.
Value for the property.
Ordinal position for the indexed property value.
Gets the value for the DropTarget property.
Value for the property.
Gets the value for the ItemFocused property.
Value for the property.
Gets the value for the indexed LargeImages property.
Value for the property.
Ordinal position for the indexed property value.
Gets the value for the HoverTime property.
Value for the property.
Gets the value for the ItemIndex property.
Value for the property.
Determines if the specified Boolean property has been set in the control.

GetProperty is a Boolean method used to determine if the specified property value has been set to True in the control.

ALvpOrd contains a value from the TListViewProperty enumeration which identifies the property value accessed in the method. The return value is True when ALvpOrd has been included in the internal TListViewProperties set.

This technique allows multiple Boolean properties to be represented using a single set type member variable. It avoids allocating a Boolean member for each of the property values.

GetProperty is used as the read access specifier for several properties in TCustomListView, including:

- ColumnClick
- HideSelection
- OwnerDraw
- ShowColumnHeaders
- ShowWorkAreas
- ToolTips
- CheckBoxes
- FlatScrollBars
- FullDrag
- GridLines
- HotTrack
- MultiSelect
- ReadOnly
- RowSelect

See SetProperty for the write access specifier equivalent.

Value for the property.
Ordinal TListViewProperty value used to access the property value.
Gets the value for the SelCount property.
Value for the property.
Gets the value for the Selected property.
Value for the property.
Gets the value for the TopItem property.
Value for the property.
Gets the value for the ViewOrigin property.
Value for the property.
Gets the value for the VisibleRowCount property.
Value for the property.
Makes the last visible column fill the remaining width in the control.

ResizeLastColumn is a method used to make the last visible column fill the remaining unused width for the control.

ResizeLastColumn is relevant when ViewStyle is set to vsList or vsReport, and ColumnCount is not set to 0 (zero). No actions are performed in the method if both conditions are not met.

ResizeLastColumn examines the values in Columns (in reverse order) to find the last TListColumn instance with its Visible property set to True. The accumulated width for the preceding visible columns (and borders) is calculated. The difference between ClientWidth and the accumulated width is used for the last column when it is a positive non-zero value.

The column affected in the method has its AutoSize, MinWidth, and MaxWidth properties reset before applying the new Width.

ResizeLastColumn is used when AutoWidthLastColumn is set to True. The method is called when the bounds for the control have been changed, or when the value in AutoWidthLastColumn has been changed.

Sets the value for the AllocBy property.
New value for the property.
Sets the value for the AutoWidthLastColumn property.
New value for the property.
Sets the value for the Columns property.
New value for the property.
Sets the value for the DefaultItemHeight property.
New value for the property.
Sets the value for the DropTarget property.
New value for the property.
Sets the value for the ItemFocused property.
New value for the property.
Sets the value for the HotTrackStyles property.
New value for the property.
Sets the value for the HoverTime property.
New value for the property.
Sets the value for the IconOptions property.
New value for the property.
Sets the value for properties like LargeImages, SmallImages, and StateImages.

SetImageList is the write access specifier for properties including LargeImages, SmallImages, and StateImages. The value in ALvilOrd indicates which image list is updated in the method.

TListViewImageList value which identifies the image list updated in the method.
New value for the indexed property.
Sets the value for the LargeImagesWidth property.
Identifier for the image list affected in the method.
New value for the property.
Notifies the widgetset class when an image list for the control has been changed.
Identifies the image list updated in the method.
Sets the value for the ItemIndex property.
New value for the property.
Sets the value for the Items property.
New value for the property.
Notifies the widgetset class when the visibility for a list item has been changed.

Calls the ItemShow method in the widgetset class.

No actions are performed in the method during LCL component streaming, or when the Handle has not been allocated for the control.

List item with the changed visibility.
True when the list item can be partially visible in the control; False requires the item to be fully visible to be displayed.
Sets the value for the OwnerData property.
New value for the property.
Sets the value for the specified Boolean property.

SetProperty is a method used to set the Boolean value for the property represented by the value in ALvpOrd.

ALvpOrd contains a value from the TListViewProperty enumeration which identifies the property updated in the method. AIsSet contains the new Boolean value for the property.

SetProperty is used as the write access specifier for several properties in TCustomListView, including:

- ColumnClick
- HideSelection
- OwnerDraw
- ShowColumnHeaders
- ShowWorkAreas
- ToolTips
- CheckBoxes
- FlatScrollBars
- FullDrag
- GridLines
- HotTrack
- MultiSelect
- ReadOnly
- RowSelect

This technique allows multiple Boolean properties to be represented using a single set type member variable. It avoids allocating a Boolean member for each of the property values.

See GetProperty for the read access specifier equivalent.

Identifies the property updated in the method.
Value for the specified property.
Sets the value in the ScrollBars property.
New value for the property.
Sets the value in the Selected property.
New value for the property.
Sets the value for the ShowEditorQueued property.
New value for the property.
Sets the value for the SortColumn property.
New value for the property.
Sets the value for the SortDirection property.
New value for the property.
Sets the value for the SortType property.
New value for the property.
Sets the value for the ViewOrigin property.
New value for the property.
Sets the value for the ViewStyle property.
New value for the property.
Performs an asynchronous display of the editor for the control.

Toggles the Boolean value in the ShowEditorQueued property, and calls the ShowEditor method.

QueuedShowEditor is called when the ShowEditorQueued property is set to True. Application.QueueAsyncCall is used to asynchronously execute the method.

Not used in the current implementation.
Not implemented in the current LCL version.

Not implemented in the current LCL version. Updates to scrll bar visibility, position, or range are handled in the widgetset class.

Handles the CN_NOTIFY message for the control.

CNNotify is a method used to handle control notification (CN_NOTIFY) messages received from the widgetset class for the control. The message in the AMessage argument contains additional information that tells the control the action to perform, and control-specific values for the action.

For TCustomListView and TListView, the message may contain List View Notification codes like the following:

LVN_DELETEITEM
  Deletes a specific list item on the control.
LVN_DELETEALLITEMS
  Deletes all list items on the control.
LVN_COLUMNCLICK
  Handles a mouse click on a column header.
LVN_ITEMCHANGED
  Updates the control when the focus, selection, or state values for a list item are changed.

CNNotify updates property values and calls methods in the class instance as needed to respond to the notification message.

Message examined in the method.
Handles the CN_DRAWITEM control notification message for the control.

CNDrawItem is a method used to handle the CN_DRAWITEM control notification message for the list view control. CNDrawItem uses the Canvas for the control to perform drawing operations needed to draw a list item or area on the control. No actions are performed in the method if the control Canvas has not been assigned.

Message contains information about the list item or area drawn on the control, including:

DC
  The device context (handle) assigned to the control Canvas.
ItemID
  Ordinal position in Items for the list item drawn in the method, or -1 when a given area on the control is filled.
ItemState
  Drawing state for the list item.
Area
  Rectangular area filled with the Brush for the control.

If the message contains a valid ItemID (not -1), the DrawItem method is called to draw the list item in the specified state. If the ItemID is -1, the FillRect method in Canvas is called to fill the specified Area using the Brush for the control.

Message examined in the method.
Clears the current selection for the control.

InvalidateSelected is a method used to clear the current selection for the control. It sets the value in the Selected property to Nil, and resets the internal memeber used to track the selected item in OwnerData mode. It also updates the control flags to remove the value lffSelectedValid.

InvalidateSelected is called when a list item is deleted which is the current value in Selected, or when all list items are deleted for the control. It is also called when a new value is assigned to Selected.

Implements the event handler signalled when the handle for an image list resolution is freed.
Performs an asynchronous notification when an image list in the control is changed.

Calls SetImageListWS using the TListViewImageList value passed in the Data argument.

Identifies the image list updated in the control.
Hides the editor control for the list view.

HideEditor is a method used to hide the TCustomListViewEditor instance used as the editor in the list view control.

HideEditor applies the current text in the editor to the selected Item by calling DoEndEdit. The Visible property in the editor is set to False. Values in the editor are reset, including the reference to the list item and the bounds for the editor control.

HideEditor is called when the list view control loses focus. It is also called when horizontal and vertical scroll messages are handled in the control, and when a column has been clicked.

Use ShowEditor to configure and display the editor for the current item in the list view control.

Displays the editor for the list view control.
Handles the LM_HSCROLL message for the control.
Message examined in the method.
Handles the LM_VSCROLL message for the control.
Message examined in the method.
Indicates if ShowEditor has been called asynchronously for the control.
Called when the specified list item is removed from the list.

ItemDeleted is a method called when the specified list item is removed from the Items for the control.

ItemDeleted ensures that the list item in AItem is not referenced as a selected or focused item on the control. If AItem is the value in Selected, Selected is set to Nil and the control flags are updated to removed the valid selection flag (ffSelectedValid). If AItem is the focused list item on the control, the focus reference is set to Nil.

ItemDeleted is called when the TListItem instance in AItem is freed from the container in Items. ItemDeleted calls DoDeletion to execute the Delete method in TCustomListView (when not overridden) or signal the OnDeletion event handler (when assigned).

TListItem instance deleted from the Items for the control.
ItemInserted
- the specified item is inserted into the list.
Gets the default size for new instances of the class.

GetControlClassDefaultSize is an overridden TSize class function used to get the default size for new instances of the class type. In TCustomListView, the default dimensions are 250 pixels wide by 150 pixels high.

TSize instance with the default dimensions for a new instance of the class.
InitializeWnd
- calls inherited method, then sets various local properties.
InitializeWnd
- calls inherited method, then sets style, adds columns, sets imagelists and item depending properties (scroll bars, sorting etc), adds items and sets other miscellaneous properties (default item height, hot track styles, hover time etc)
TWinControl.InitializeWnd
Frees the window handle and other resources for the control.
FinalizeWnd
retrieves the cached origin for the list view and finalizes the items and columns for the control.
TWinControl.FinalizeWnd
Signals the OnCreateItemClass event handler to get the class type used for new list items, and creates a new list item.
List item created in the method.
Creates a new TListItems instance.
TListItems instance created in the method.
Determines if the specified Item can be edited in the control.

CanEdit is a Boolean function used to determine if the editor can be displayed and activated for the specified Item. The return value defaults to True.

CanEdit signals the OnEditing event handler (when assigned), where the return value can be modified. Use values in Item or the list view control to determine the return value (including their respective ReadOnly properties).

CanEdit is called from the ShowEditor method, and occurs before the Editor in the control is configured and displayed.

True if the editor can be displayed and activated for the specified item.
List item to examine in the method.
Change
- Internal procedure to simulate the OnChange event.

This is an internal procedure which is called after an item has been changed. It is a programmatic method for simulating the OnChange event if the programmer has assigned a method to this event.

Performs actions to handle a mouse click on a Report view column header.

ColClick is a method used to handle a mouse click on a column header when the list view control is in Report view (ViewStyle = vsReport).

ColClick ensures that the Editor for the control is hidden when it has been assigned and displayed for the control.

AColumn is the TListColumn instance representing the column header clicked on the control. The OnColumnClick event handler is signalled (when assigned) if ColumnClick is set to True. The event handler can be used to adjust property values in the column argument or the list view control as needed.

ColClick uses the value in AutoSort to determine if the control is updated to reflect a change to the sort column or its order indicator. No additional actions are performed when AutoSort is False or SortType is stNone.

When AutoSort is set to True, the Index in AColumn is used to set the value for the SortColumn property, When AutoSortIndicator is enabled, the Columns for the control are updated to clear any previous sort indicators when a new sort column has been clicked. The sort indicator in the AColumn argument is also updated. If AColumn was already the SortColumn for the control, the value in SortDirection is toggled between it ascending and descending values.

ColClick is called when the LVN_COLUMNCLICK control notification message is handled for the list view control.

List view column clicked in the header for the control.
Deletes the specified list item.

Delete is a method used to delete the list item specified in AItem.

In Delphi, Delete is called when Items.Delete is executed. The OnDeletion event handler is signalled each time the method is called, even when list items are freed from the Items container.

The Lazarus implementation differs. It uses a flag value in AItem to determine if the method has been called when the list item is freed, or when the Delete method in the list item has been called explicitly.

Delete is called from the DoDeletion method if an overridden Delete method has been implemented. The OnDeletion event handler is signalled when Delete has been explicitly called, and when the Delete method has not been overridden.

While not 100% Delphi compatible, it is more compatible than previous LCL versions.

List item deleted in the method.
Performs actions needed to delete the specified list item.

DoDeletion ensures an overridden Delete method in a descendent class is always executed for the list item in AItem. If the method has been overridden, the OnDeletion event handler is signalled (when assigned).

DoDeletion is called from ItemDeleted, and occurs after the value in LastSelected has been updated.

List view item deleted in the method.
Performs actions needed to insert the specified list item.

DoInsert ensures an overridden Insert method in a descendent class is always executed for the list item in AItem. If the method has been overridden, the OnInsert event handler is signalled (when assigned).

DoInsert is called from the ItemInserted method which occurs when the list item is stored in the Items property.

List view item inserted in the method.
Inserts an Item into the List.

Signals the OnInsert event handler (when assigned) using the value in AItem as an argument.

InsertItem is called from the DoInsert method when an overridden method has been implemented in a descendent class and called from ItemInserted.

Item with the values inserted into the Items for the control.
Synchronizes the checked state for an item with the widgetset class.
Signals the OnSelectItem event handler when the current selection is changed.
Adjusts the layout for the list view using the specified arguments.

DoAutoAdjustLayout is an overridden procedure used to adjust the layout for the list view using the specified arguments. DoAutoAdjustLayout calls the inherited method.

DoAutoAdjustLayout extends the ancestor method to include support for sizing the columns in the list view using the proportions specified in AXProportion and AYProportion for the display density (DPI). DoAutoAdjustLayout also ensures that the widgetset class is initialized for each of the image list sizes represented by the TListViewImageList enumeration.

No actions are performed in the method if AMode does not include one of the following values: lapAutoAdjustWithoutHorizontalScrolling or lapAutoAdjustForDPI.

TControl.DoAutoAdjustLayout
Layout adjustment policy used in the method.
Factor used to adjust widths.
Factor used to adjust heights.
Set the bounds for the control to the specified values.

Resizes the last column (if enabled) when the bounds for the control have been changed.

Left coordinate for the control.
Top coordinate for the control.
Width for the control.
Height for the control.
Performs actions when editing has been completed for an item in the control.

Calls an overridden Edit method when available, or signals the OnEdited event handler (when assigned).

Signals OnEdited to validate the editor text, and updates the caption for the specified list item.
List item updated in the method.
ImageChanged
- procedure to signal that an image has changed.
Object for the event notification.
Performs actions when LCL component streaming is completed for the component.

Creates columns in the widgetset class when the Handle for the control has been allocated. Calls the inherited method prior to exit.

TWinControl.Loaded
Handles the notification when a component is added to or removed from the class instance.

Ensures that members for the LargeImages, SmallImages, and StateImages are set to Nil when the corresponding image list is removed.

Component for the notification.
Operation performed for the component.
IsCustomDrawn
- returns True if a target has been custom drawn.

Indicates whether the control, items, or sub-items are custom-drawn using the event handlers available in the control.

Performs custom drawing in the given rectangle and returns True if successful.

CustomDraw draws the control using the OnCustomDraw or OnAdvancedCustomDraw event handlers (when assigned).

Custom draws the specified item and returns True if successful.

CustomDrawItem draws an item in the control using the OnCustomDrawItem or OnAdvancedCustomDrawItem event handlers (when assigned).

Custom draws the specified subitem returning True if successful.

CustomDrawSubItem draws a sub-item in the control using the OnCustomDrawSubItem and OnAdvancedCustomDrawSubItem event handlers (when assigned).

IntfCustomDraw
- uses the interface to perform custom drawing and returns a result of drawing.
Gets the value for the internal update counter.
The internal counter is maintained when the BeginUpdate and EndUpdate methods are called.
Value for the internal update counter in the control.
Draws the specified list item with a given state.

Signals the OndrawItem event handler (when assigned) to draw the list item. Calls the FillRect and TextOut methods in the control Canvas when the event handler is not assigned.

Performs actions to get list item data when OwnerData is True.

Signals the OnData event handler (when assigned) to get the data for the list item. Properties in Item are updated in the event handler with the values needed for the list item.

Signals the OnDataHint event handler (when assigned).
Signals the OnDataStateChange event handler (when assigned).
Performs actions needed when the control is double clicked.

Calls the inherited DblClick method. Ensures that ShowEditorQueued is set to True when the control has an assigned editor and is not marked as read-only.

TControl.DblClick
Handles key down messages for the control.

Handles an F2 function key pressed when the control has focus. Ensures that the editor is displayed when the control is not marked as ReadOnly. The keystroke is digested (set to zero).

If the control is marked as ReadOnly, or Key is not the unshifted F2 function key, the inherited KeyDown method is called to handle the values in Key and Shift.

TWinControl.KeyDown
Virtual key code examined in the method.
Shift, Alt, or Ctrl modifier for the key code.
Reduces allocation overhead in the widgetset class by increasing the internal buffer capacity by this block size.
Controls automatic updates to the sort column and order indicator for the control.

AutoSort is a Boolean property used to determine whether the sort column and order indicator are automatically updated when a Report view column header on the control is clicked. The default value for the property is True.

When enabled, the value in SortColumn is set to the position for the clicked column header. Use AutoSortIndicator to control whether the sort indicator is automatically updated for the Columns defined for the control.

AutoSort has no effect when SortType is set to stNone.

Indicates if the control automatically changes the column and/or order indicator when a column is clicked.

AutoSortIndicator is a Boolean property which controls whether the sort column and order indicator are changed when a Report view column header is clicked. The default value for the property is False. When set to True, a clicked column causes the sort indicator to be updated to reflect the value in SortDirection.

AutoSortIndicator is significant when AutoSort has been enabled and SortType is not set to stNone.

Resizes the last visible column to fill the remaining display area for the control.

AutoWidthLastColumn is a Boolean property which indicates if the last visible column is expanded to fill any unused display area for the list view control. When set to True, the affected column is located its Width is calculated and applied.

AutoWidthLastColumn is relevant when ViewStyle contains vsList or vsReport, and the Columns property has been populated for the list view control.

Enables or disables OnColumnClick events for column headers on the control.

ColumnClick is an indexed Boolean property which controls whether the OnColumnClick event handler is signalled when a Report view column is clicked. The default value for the property is True. Changing the value for the property causes the widgetset class to be updated with the new property value.

ColumnClick is used in the ColClick method, which is called when the LVN_COLUMNCLICK control notification message is handled for the list view control.

Collection with the column definitions for the list view control (size, alignment, image index, etc.).

Columns is a TListColumns property which contains the column definitions for the list view control. The TListItem instances in the collection contain information about the caption for the column header, column width, image, and sort indicator value. Assigning a new collection to the property causes the designer for the parent form to be updated at design-time.

Column is significant when the ViewStyle for the control is set to vsReport. Report view is the only style where the columns are used or displayed. Set the value in ShowColumnHeaders to True to display the column header defined in the collection.

Columns are used at run-time to handle column click notifications and changes to the sort indicator. Use AutoSort, AutoSortIndicator, SortColumn, SortType, and SortDirection to access or maintain values for items in the collection.

The Count property in Columns also provides the value for the ColumnCount property in the list view control.

Use the indexed Column property to access a column definition by its ordinal position in the Columns collection.

Default height for items displayed on the list view control.

Used in the widgetset class to render the items on the list view control. If the property is set to zero (0) or a negative value, the value defaults to 20 pixels. Changing the value for the property causes the widgetset class to be updated when its Handle has been assigned.

If control looses focus, don't paint selection background for selected item(s).

HideSelection is a Boolean property which indicates if the selected item(s) for the list view are highlighted when the control loses focus. When set to True, the selected item(s) are redrawn to remove the selection highlighting. When set to False, the selection hightlighting is retained when the control loses focus.

The default value for the property is True. Changing the value for the property causes the widgetset class to be updated with the new value.

The Windows API documentation recommends setting HideSelection to False if the application uses Accessiblity roles and descriptions.
Time (in milliseconds) that the mouse cursor must hover over an item before its tool tip is shown.

The default value for the property is -1, and indicates that a non-default value has not been assigned and that the default for the platform or operating system is used. Changing the property value causes the widgetset class to be updated when its Handle has been allocated.

ImageList object, which contains "big" icons for one if ListView layouts.

A typical application might have two ImageLists: one of LargeImages and one of SmallImages containing two versions of the same collection of images, in large and small format; the index numbers of the first list would correspond with those in the second list.

SmallImages could be displayed beside the text strings in the list view and the programmer would supply code to ensure that when an item with its associated SmallImage was selected, the corresponding LargeImage would be displayed in another window.

A TImageList control needs to be selected and pasted on to the Form Designer and the ImageList Editor can be opened from the pop-up menu obtained by right-clicking on TImageList icon in the Form Designer. Then in the StringList editor for Items the correct ImageIndex must be allocated to each entry in the list.

Contains the Width for the large images used in the list view.

LargeImagesWidth is an Integer property with the width for large images in the list view. The value indicates the image resolution requested from the LargeImages image list. If a resoution using the requested width does not already exist, it is created by scaling a candidate resolution for the image list.

The default value for the property is zero (0), and causes the width stored in LargeImages to be used for the large images.

Indicates if owner-draw mode is used for the control.

OwnerDraw is a Boolean property which indicates if the control implements is own drawing routines instead of using the default drawing routines for list items on the control. The default value for the property is False.

When set to True, the OnDrawItem event handler is signalled to draw list items when the control is using the Report view style (ViewStyle = vsReport). The handler is signalled (when assigned) from the DrawItem method, and occurs when the CN_DRAWITEM control notification message is handled for the control. It should handle all aspects of drawing the list item to the control Canvas. If OnDrawItem has not been assigned, a basic default drawing routine is used.

Specifies the scroll bars visible for the control.

ScrollBars is a TScrollStyle property which specifies the scroll bars visible for the control. The default value for the property is ssBoth, and indicates that both horizontal and vertical scroll bars are always visible on the control.

See TScrollStyle for the values available in the property and their meanings.

Changing the value for the property causes the widgetset class to be updated when its Handle has been assigned.

TScrollStyle
Show header area in ListView, which shows captions of columns.

ShowColumnHeaders is a Boolean property which indicates whether column headers are displayed for the Report view style (ViewStyle = vsReport). When enabled, the captions for the list Items are displayed as column headers.

The default value for the property is True. Changing the value for the property causes the widgetset class to be updated when its Handle has been assigned.

Indicates if work area captions and highlights are enabled for the control.

ShowWorkAreas is an indexed Boolean property used to configure whether work areas are displayed on the control.

Work areas are not implemented (for any platform) in the current LCL version.
ImageList object, which contains "small" icons for one if ListView layouts.

A typical application might have two ImageLists: one of LargeImages and one of SmallImages containing two versions of the same collection of images, in large and small format; the index numbers of the first list would correspond with those in the second list.

SmallImages could be displayed beside the text strings in the list view and the programmer would supply code to ensure that when an item with its associated SmallImage was selected, the corresponding LargeImage would be displayed in another window.

A TImageList control needs to be selected and pasted on to the Form Designer and the ImageList Editor can be opened from the pop-up menu obtained by right-clicking on TImageList icon in the Form Designer. Then in the StringList editor for Items the correct ImageIndex must be allocated to each entry in the list.

Width for the images in the SmallImages property.

SmallImagesWidth is an Integer property that indicates the width for the small images displayed in the list view. The value indicates the image resolution requested from the SmallImages image list. If a resoution using the requested width does not already exist, it is created by scaling a candidate resolution for the image list.

The default value for the property is zero (0), and causes the width stored in the image list to be used for its images.

Specifies the sorting mechanism used for the current SortColumn.

SortType is a TSortType property which specifies the sort mechanism used for the items in the list view control.

The default value for the property is stNone, and indicates that sorting is not performed for the list items on the control. See TSortType for the values available for the property and their meanings.

Changing the value in SortType causes the Sort method to be called.

SortType is used in the ColClick method to determine if SortColumn and SortDirection are updated when a column header is clicked for the control. Values in SortType, SortColumn, and SortDirection are also passed to the widgetset class when its Handle is allocated or updated.

Ordinal position for the column used to sort the list items, or -1 when not assigned.

SortColumn is an Integer property with the ordinal position for the column used to sort the list items for the control. The default value for the property is -1, and indicates that an explicit column position has not been assigned.

Changing the value for the property causes the Sort method to be called.

SortColumn is updated in the ColClick method when a column header for the control has been clicked. It also indicates which entry in Columns has the sort indicator when AutoSortIndicator is enabled.

Values in SortType, SortColumn, and SortDirection are passed to the widgetset class when its Handle is allocated or updated.

Sorting direction (order) for the current SortColumn.

SortDirection is a TSortDirection property which indicates the sort direction (or order) for the column in the SortColumn property. The value can be sdAscending for ascending sort order, or sdDescending for descending sort order. The default value for the property is sdAscending.

Changing the value for the property causes the Sort method to be called to display the items on the control in the selected sort order.

Use SortType to specify whether the text values, data values, or both are used to sort the list items. Set SortType to stNone to disable sorting in the control. Use SortColumn to set the column number with the values that are sorted.

Use AutoSort and AutoSortIndicator to automatically change the sort column and indicator when a column header is clicked on the control.

Image list with the state images for the items on the control.

StateImages is a TCustomImageList property which contains the images used to display the state for the list items on the control. A state image is displayed to the left of the icon for a list item. Its meaning or usage is application specific.

Assigning a new image list to the property causes the widgetset control to be updated.

Use StateImagesWidth to override the width for the images in StateImages. If StateImagesWidth has not been assigned, the width in the image list is used.

Use the OnChange, OnItemChecked, or OnDataStateChange event handlers to perform actions like setting the state image index for a list item when a list item is modified.

Width of the images in the StateImages property.

StateImagesWidth is an Integer property the represents width used for state images displayed in the list view. The default value for the property is zero (0) and indicates that a default image width has not been specified.

Indicates if a hint (tool tip) is automatically displayed for an item under the mouse cursor.
TControl.Hint
Sets one of ListView layouts: List (simple column), Report (few columns with full width), Icon (big icons), Small Icon (small icons, 16x16).

ViewStyle is a TViewStyle which controls the appearance and layout for the list items on the control. The default value for the property is vsList, and causes an icon and caption to displayed for each list item. List items are arranged in columns, filled from top to bottom and then left to right.

See TViewStyle for a description of the view style values and their meanings.

Changing the value for the property causes the widgetset control to be updated when its handle has been allocated.

Event handler signalled when the content for a list item is changed.

OnChange is a TLVChangeEvent property with the event handler signalled when property values for a list item have been changed. OnChange is signalled from the Change method, which is called when a LVN_ITEMCHANGED control notification message is handled for the control.

Argument passed to the event handler identify the list view control, the list item updated in the message, and a change constant that identifies the value updated in the list item. The constant represents whether the text, image, or state for the list item has been altered.

Use the OnSelectItem event handler to perform actions needed when the selected list item has changed for the control. Use OnItemChecked to perform actions needed when the checked state for a list item has been changed.

Event handler signalled when a column header for the control is clicked.

OnColumnClick is a TLVColumnClickEvent property with the event handler signalled when a column header for the list view control has been clicked. OnColumnClick is signalled (when assigned) from the ColClick method when ColumnClick has been enabled for the control.

Arguments passed to the event handler identify the list view control and the TListColumn instance clicked in the control. It is signalled before values in SortType, SortColumn, and SortDirection are checked or updated. It is commonly used to enabled or disable AutoSort or AutoSortIndicator when a specific column is clicked.

Event handler signalled to compare list items in the CustomSort method.

OnCompare is a TLVCompareEvent property with the event handler signalled to compare the values for list items. Arguments passed to the event handler identify the list view control, the items compared in the handler. The relative sort order for the compared items is returned in a variable parameter passed to the handler.

OnCompare is signalled (when assigned) when the Sort method is called, or when CustomSort is called without specifying a custom sort function.

Event handler signalled to get the class reference used to create new list view items.

OnCreateItemClass is a TLVCreateItemClassEvent property with the event handler signalled when a new list item is created in the CreateListItem method. It is signalled (when assigned) to allow a custom list item class type to be used in the list view control.

Arguments passed to the event handler identify the list view control and the default class type used for the list items in the control. TListItem is the default class type used to create and store the values in the Items property.

Event handler signalled to the value(s) for a list item when OwnerData (virtual mode) has been enabled.

OnData is a TLVDataEvent property with the event handler signalled to get the values for a list item when OwnerData (virtual mode) has been enabled for the list view control.

An application must implement and assign an object procedure using the signature in TLVDataEvent to respond to the event notification. Arguments passed to the event handler identify the list view control (Sender) and the list item (Item). The Index property in Item is pre-populated with the ordinal position for the requested data. The event handler is responsible for setting values for any of the other properties in Item.

OnData is signalled from the DoGetOwnerData method, and is called when the virtual list item accesses its property values.

When OwnerData is enabled, the Items property is not used. Only the most recently accessed item in ItemIndex is available.

Event handler signalled to locate list item data in OwnerData (virtual) mode.

OnDataFind is a TLVDataFindEvent property with the event handler signalled to locate the data for a list item when OwnerData (or virtual mode) has been enabled.

The current LCL version does not signal the OnDataFind event handler. Use the OnData event handler instead.
The event handler is not signalled in the current LCL implementation.

OnDataHint is not used in the current LCL implementation. In virtual mode (OwnerData = True), only the most recently accessed virtual list item exists in the list view control. The data hinting, or pre-fetch caching, feature is not used in the current implementation.

Not used in the current LCL version.
Not used in the current LCL version.
Event handler signalled when a list item is deleted from the Items container.

OnDeletion is a TLVDeletedEvent property with the event handler signalled when a list item is deleted from the Items container. It provides better compatibility with the Delete method as implemented in Delphi.

In Delphi, the Delete method is called when the Items.Delete method is called. But calling the method directly will also delete the item and then call the OnDeletion handler.

In that case we simply call Items.Delete and this will then call Delete again and in the second run we call the OnDeletion handler. Not 100% Delphi compatible, but more compatible then it was before. (BB)

Event handler signalled when editing has been completed for a list item in the control.
Event handler signalled to determine if editing can be started for a list item in the control.
Called when a list item is inserted in program code.
Event handler signalled when the Checked property for a list item has been changed.

Signalled (when assigned) from the DoItemChecked method when the Checked property for a list item has been changed. It occurs when the LVN_ITEMCHANGED list view notification message is handled for the control..

Event handler signalled when the selected list item for the control is changed.

OnSelectItem is signalled when a LVIS_SELECTED message is handled for the control, and occurs after the OnChange event handler has been executed (when assigned). The value in Item may be Nil when Selected has been cleared for the list view control.

Called for owner-draw mode.
Called for owner-draw mode.
Called for owner-draw mode.
Event handler signalled to render an owner drawn item.

OnDrawItem is a TLVDrawItemEvent property which is the event handler signalled to render an owner drawn item. The event is triggered (when assigned) in the DrawItem method only when OwnerDraw is set to True and ViewStyle contains vsReport.

Called for owner-draw mode.
Called for owner-draw mode.
Called for owner-draw mode.
Constructor for the class instance.

Create is the overridden constructor for TCustomListView. It calls the inherited Create method, and allocates resources needed for the class instance.

Create sets the default values for properties and the control style flags. It creates a TChangeLink instance for the image lists in SmallImages, LargeImages, and StateImages. The change links are configured to use the ImageChange and ImageResolutionHandleDestroyed methods in their event handlers. It also creates the TCustomListViewEditor instance used to edit values in the list view control.

TWinControl.Create
Owner of the class instance.
Destructor for the class instance.
Destroy
is the destructor for TCustomListView. It frees the Canvas, calls the inherited Destroy, and frees the columns and list items.
TWinControl.Destroy TComponent.Destroy
Adds a list item with the specified caption and optional object.
Caption for the new list item.
Optional object instance for the list item.
Sorts the first column for the list view in ascending order.
Always sorts column 0 in sdAscending order.
Sorts the values in Items when SortType is not stNone and SortColumn is valid.
Sorts the Items for the list view control using the specified procedure or the OnCompare event handler.
BeginUpdate
- start updating the list view.
Clears the Items for the list view.
Finishes an active update for the list view control.
Updates the OwnerData (when used), and repaints the control.
FindCaption
- search for and return the list item that contains the nominated caption.

FindCaption- search for and return the list item that contains the nominated caption.

Starting from item at StartIndex

Looking for the string with the content in Value

Partial, Inclusive, Wrap, PartStart: Boolean arguments that allow matches with part of the string, permitting the string to wrap over a line, etc.

Locates the specified list item data in the Items for the control.
Gets hit test information from the widgetset class when its Handle has been assigned.
GetItemAt
- find and return the list item at the specified coordinates.
Locates the list item closest to the specified position.

GetNearestItem is used to locate a list item from a position specified in pixel coordinates relative to the top left corner of the list view. It starts looking at the position specified by the Point parameter, and moves in the direction indicated by the Direction parameter until it locates a list item.If no item is found Nil is returned.

Gets the next list item in the given direction from the starting item.

GetNextItem is a TListItem function used to find the next list item after StartItem in the direction given by the Direction parameter. Only items in the state indicated by the States parameter are considered. If no item is found, Nil is returned.

Clears single or multi-selections in the control.
Selects all Items in the control when MultiSelect has been enabled.
Indicates if the editor is active in the list view control.
Delphi compatible function which returns if our listview editor is active.
Coordinates of the rectangle containing the list view control.
Line style drawn as a border around the control.

BorderStyle is a TBorderStyle property which indicates the line style used to draw the borders for the control. The default value for the property is bsSingle in TCustomListView.

TWinControl.BorderStyle TBorderStyle TFormBorderStyle
TCanvas instance used to draw the control.

Canvas is a read-only TCanvas property with the canvas used to perform drawing operations for the control. At run-time, a TControlCanvas instance is created and assigned to the property.

Canvas is used in the DrawItem method, and when the CN_DRAWITEM control notification message is handled for the control. It is also used to get text metrics when the editor for the control is displayed.

TControlCanvas
Displays a check box column for the list items on the control.

Checkboxes is a Boolean property which indicates if check boxes are displayed next to list items on the control. The default value for the property is False. Changing the value for the property causes the widgetset class to be updated.

Use the OnItemChecked event handler to perform actions needed when the check state for a list item has been changed.

CheckBoxes is used when a LVN_ITEMCHANGED notification message is handled for the control with a LVIF_STATE change flag.

The value in CheckBoxes is ignored when OwnerData is set to True. Check box display cannot be enabled for virtual mode.

Provides indexed access to the columns defined for the control.

Column is an indexed read-only TListColumn property which provides access to the information for a given column by its position. The column whose information is to be retrieved is determined by an index (AIndex). As with nearly all indexes, this index is 0 based.

Use the Columns property to add, change or delete a column definition.

Use the Items property to access the TListItem instances with the data displayed using the column definitions. The Caption in a given list item is the value display in Column[0]. Subsequent column values use the values in SubItems; i. e. Column[1] is SubItem[0], etc.

Ordinal position in Columns for the column instance.
The number of defined Columns for the control.

ColumnCount is a read-only Integer property which indicates the number of columns displayed for the list view. The property value is read from the Count property in Columns.

Use methods in Columns to maintain the column definitions in the collection, such as Add, Insert, Delete, and Clear.

The list item that is the drop target on the control.

DropTarget is a TListItem property with the list item that is the drop target for the control. Read and write access for the property value is redirected to the widgetset class, where the DropTarget property in the TListItem instances are maintained.

Enables scroll bars using a "flat" display style when available for the widgetset.

FlatScrollBars is a Boolean property which indicates if scroll bars are drawn using a "flat" display style. Flat scroll bars are not drawn using raised 3-D relief with shadowing normally used for borders or edges on the control. It also applies color inversion when elements in the control are hovered under the mouse pointer.

The default value for the property is False. Changing the value for the property causes the widgetset class to be updated.

Indicates whether column headers are redrawn during a drag / resizing operation.
Enables or disables grid lines between rows and columns on the control.

GridLines is a Boolean property used to enable or disable drawing of a 1-pixel grid line between rows and columns on the control. The default value for the property is False, and hides the grid lines. Changing the value for the property causes the widgetset class to be updated.

Enables or disables hot tracking selection when the mouse is hovered over an item.

HotTrack is a Boolean property used to enable or disable the hot tracking selection feature for the items in the list view control. HotTrack is one of the extended list view styles represented by the LVS_EX_TRACKSELECT constant.

When enabled, a list item is automatically selected (or de-selected) when the mouse pointer is hovered over a list item for a short period of time. It can be used in MultiSelect mode when the Shift, Ctrl, or Shift+Ctrl keys are held while moving and hovering the mouse pointer.

Use HoverTime to specify the hover duration (in milliseconds) before a list item toggles its selected state.

Use HotTrackStyles to set the cursor shape or font attributes for hot tracked items in the control.

This feature can be used in List View and in Tab controls.

Hot tracking styles enabled for the control.

HotTrackStyles is a TListHotTrackStyles property which contains the extended list view style options for hot tracking. It contains zero or more values from the the TListHotTrackStyle enumeration. The values control the cursor shape or the font attributes applied to list items when the mouse pointer is hovered over the items.

See TListHotTrackStyle for more information about the values in the enumeration and their meanings.

The default value for the property is an empty set ([]). Changing the value for the property causes the widgetset class to be updated. The property value is posted to the widgetset class when its Handle is allocated or updated.

Use the HotTrack property to enable or disable the hot tracking selection feature for the list view control.

Options for layouts, which show icons. Sets arrangement of icons, text-wrapping state.

IconOptions is a TIconOptions property with the icon options used when the list view uses the vsIcon or vsSmallIcon view style. Values in IconOptions are passed to the widgetset class to render the control using the native style for the platform. Set values in its properties to control the icon placement, auto-arrange features, and caption text wrapping for a list item on then control.

The list item which has focus on the control.

ItemFocused is a ItemFocused property which contains the list that has focus on the list view control. The property value is Nil if a list item has not been focued on the control. Changing the value in the property to a valid list item causes the widgetset class to be updated when its Handle has been assigned.

ItemFocused is updated when a LVN_ITEMCHANGED notification message with a focus state change is handled for the list view control.

Use Selected to access the list item which is selected on the list view control.

Ordinal position for the selected list item on the control.

ItemIndex is an Integer property which contains the ordinal position for the selected item on the list view control.

When OwnerData is False, the property value contains the value received from the widgetset class when the LVN_ITEMCHANGED notification message is handled for the control. If OwnerData is True, an internal member is locally maintained to track the selected item. In OwnerData (virtual) mode, only the most recently accessed item is stored for the control.

Setting a new value for the property causes the Selected property to be updated. In OwnerData mode, this causes the internal member to be updated and the virtual item is retrieved to set its Selected property to True. If Virtual mode is not enabled, the Selected property is set to corresponding value in Items.

If the new property value is -1, the value in Selected is set to Nil. Setting a new property value when MultiSelect is enabled also causes Selected to be set to Nil.

An Exception is raised if the new property value is not a value index position in Items, or -1.

Collection of list items displayed on the list view control.

Items - the list of entries in the list. Held as a linked list with a cached index of the last accessed item.

Items is of type TListitems which has a built-in cache of the last accessed item. This speeds up interface updates since Item.Index is often used for the same item updating more properties. If FCacheIndex = -1 then the cache is not valid.

Allows simultaneous selection of one or more list items using Ctrl+Click, Shift+Click, Ctrl+Shift+Click, or using program code.

MultiSelect is a Boolean property which indicates if multiple simultaneous item selections are allows in the list view control. The default value for the property is False, and allows a single selection as reflected in the Selected property.

When set to True, multiple entries in the Items property can bemarked as Selected. This can be achieved in program code by iterating over the TListItem instances in Items, and setting the Selected property for the appropriate items. At run-time, the mouse can be use toggle the selected state for one or more of the list items.

Click
  Toggles the selected state for the list item under the mouse pointer.
Shift+Click
  Toggles the selected state for a contiguous block of list items from the mouse pointer to the previous item selection.
Ctrl+Click
  Toggles the selected state list item under the mouse pointer without altering the previously selected list items.
Ctrl+Shift+Click
  Toggles the selected state for a contiguous block of list items from the mouse pointer to the previously focused list item.

Use SelCount to get the number of selected items when MultiSelect is enabled. Use Items to access the list items to check the values in their Selected properties.

Use SelectAll to set the selected state to True for all of the Items on the control.

Use ClearSelection to clear the selected state for all of the Items on the control.

Enables or disables owner data (virtual) mode for the list view control.

OwnerData is a Boolean property which enables or disables virtual mode for the list view control.

When set to True, the Items property does not contain the actual data displayed on the control. The display values are retrieved using the OnData, OnDataFind, and OnDataHint event handlers. Only the most recently accessed owner data item exists in the list view control. This allows the list view to be used to display a large number of items with a minimal amount of overhead.

Set the value for the Count property in Items to indicate the number of owner data items available to the list view control. Assign a routine to OnData to populate an individual list item (and sub-items if needed) from the source for the owner data.

When OwnerData is set to False, all values displayed on the list view control are maintained in the Items property.

Disables editing of list items on the control when set to True.

ReadOnly is a Boolean property used to enable or disable editing of captions for list items at run-time. When ReadOnly is set to True, the editor for the control cannot be activated using a mouse double Click or by pressing the F2 function key.

The default value for the property is False, and indicates that item editing is allowed.

In Report view, this highlights the entire selected row to the right edge of the list view control.
Number of currently selected Items when MultiSelect is enabled.

SelCount is a read-only Integer property with the number selected entries in Items. SelCount is relevant when MultiSelect is set to True; otherwise, the single selected item is found in the Selected property.

If the Handle has been allocated for the widgetset class, the value from the GetSelCount method is used as the property value. Otherwise, the property value is calculated by counting the number of TListItem instances in Items that have their Selected property set to True. The return value is 0 when none of the Items have a selected property set to True.

Use GetNextItem with the lisSelected item state to retrieve a multi-selected item that is adjacent to another selected item.

Contains the selected list item in the list view control.

Selected is a TListItem property which contains the selected list item in the list view control. Assign a value from the Items property to select the list item.

When MultiSelect is enabled, Selected represents the first entry in Items that has its Selected property set to True. If none of the list items has its Selected property set to True, or SelCount is 0, the property value is Nil.

When OwnerData (or Virtual Mode) is enabled, Selected refers to the most recent owner data item retrieved when the value in ItemIndex was changed. If the item index was set to -1, the property value is Nil.

Assigning a new value to Selected causes the existing list item in the property to be updated. In single select mode (MultiSelect = False), the Selected property for the list item is set to False prior to clearing or reassigning the property value.

When MultiSelect is enabled, setting a new value for the property causes the list item to be included in the list of multi-selected Items. If the new value is Nil, all of the entries in Items reset their Selected properties to False. In short, setting Selected to Nil clears any existing multi-selections in Items.

Setting a new value for the property causes the OnChange and OnSelectItem event handlers to be signalled (when assigned) when the LVN_ITEMCHANGED notification message is handled for the control.

Use ClearSelection to remove all selections (single or multi-) for the control.

Use SelectAll to select all list items when MultiSelect is enabled.

Contains the list item to was the most recently selected item on the control.

LastSelected is a read-only TListItem property with the most recently selected item on the control. Its value references the internal member used for the Selected property. It is updated when a value is assigned to the Selected property, or a list item is selected using the kyboard or mouse at run-time. Setting Selected to Nil or calling ClearSelection causes LastSelected to return Nil.

Allows the user to navigate to the control by pressing the Tab or Shift_Tab keys.

The default value for the property is True in TCustomListView,

TWinControl.TabStop
Listview item, which is shown at the top edge of ListView.
Coordinate with the left/top visible points in the control, updates when Listview scrolls.
Number of visible rows using the size, position, and layout for the list view control.
TListView
- a window showing a list of Items which may or may not have associated icons.

TListView - a window showing a list of items which may or may not have associated icons.

At first this control looks very like TListBox but it has a much higher degree of complexity. It is capable of displaying Items in Columns of Rows and it can have images associated with the list Items.

The important information is held in Items, a string-list that can be created using the string-list editor obtained by right-clicking on the ListView in the Form Editor or by clicking on the ellipsis (...) next to the Items entry in the Object Inspector.

A typical application might have two ImageLists: one of LargeImages and one of SmallImages, containing two versions of the same collection of images, in large and small format; the index numbers of the first list would correspond with those in the second list.

SmallImages (if assigned to a string-list) can be displayed beside the text strings in the list view and the programmer would supply code to ensure that when an item with its associated Small Image was selected, the corresponding Large Image would be displayed in another window.

One or more TImageList controls need to be added to the Form Designer and the ImageList Editor can be opened from the pop-up menu obtained by right-clicking on TImageList icon in the Form Designer. The image list can be populated by reading from files. Then in the StringList editor for Items the correct ImageIndex must be assigned to each entry in the list.

Uses the Color from the Parent control, when enabled.

ParentColor determines if the control should use the Color from the Parent control, when enabled. The default value for the property is False in TListView.

When this property is True, all changes to the Color of the parent will also be applied to the Color of the control, ensuring that they both contain same value. If the Color of the control is changed by the application, then ParentColor will be automatically set to False.

Using ParentColor when the Color value is clDefault can cause problems in resolving the actual color value. To obtain the Color property of a control while taking into account clDefault and ParentColor, use the GetColorResolvingParent method. This method might return a non-RGB color, but will never return clDefault. To obtain a purely RGB result use the GetRGBColorResolvingParent method.

TControl.ParentColor TControl.Color TControl.GetColorResolvingParent TControl.GetRGBColorResolvingParent
Represents the orientations used for a progress bar.

TProgressBarOrientation is an enumerated type with values that represent the orientations used for a progress bar. TProgressBarOrientation is the type used to implement the TCustomProgressBar.Orientation property.

Progress bar is oriented horizontally, and displays progress from left to right.
Progress bar is oriented vertically, and displays progress from bottom to top.
Progress bar is oriented horizontally, and displays progress from right to left.
Progress bar is oriented vertically, and displays progress from top to bottom.
Represents the visual display styles used for a progress bar.

TProgressBarStyle is an enumerated type with values that represent visual display styles for a progress bar. TProgressBarStyle is the type used to implement the TCustomProgressBar.Style property.

Progress bar indicator is displayed as a static bar using the native drawing style or theme for the platform.
Progress bar indicator is displayed as an animated marquee, where movement indicates activity but does not reflect the completed portion of a task.
Implements the base class for progress bar controls.

TCustomProgressBar is a TWinControl descendant which implements a progress bar control.

A progress bar is used to indicate the progress for a lengthy operation. It contains an indicator bar that is updated with the completion percentage for the task. A progress bar can use either horizontal or vertical orientations. The visual appearance of the control can be configured using drawing styles, themes, and other property settings.

TCustomProgressBar is the ancestor for TProgressBar.

TWinControl
Gets the value for the Min property.
Value for the property.
Gets the value for the Max property.
Value for the property.
Gets the value for the Position property.
Value for the property.
Sets the values for the Min and Max properties.

SetParams is a convenience method used to set new values for both the Min and the Max properties.

New value for the Min property.
New value for the Max property.
Sets the value for the Min property.
New value for the property.
Sets the value for the Max property.
New value for the property.
Sets the value for the Position property.
New value for the property.
Sets the value for the Step property.
New value for the property.
Sets the value for the Smooth property.
New value for the property.
Sets the value for the BarShowText property.
New value for the property.
Sets the value for the Orientation property.
New value for the property.
Sets the value for the Style property.
New value for the property.
ApplyChanges
- apply any changes that have occurred.

ApplyChanges is a method used to apply property values from the progress bar to the widgetset class.

Values in the Min, Max, and Position properties are normalized; i. e. Min <= Position <= Max. When the Handle has been allocated for the control, the values are applied to the widgetset class by calling its ApplyChanges method.

No actions are performed in the method when the component is being loaded using the LCL streaming mechanism.

ApplyChanges is called when the Handle is created (or re-created) in InitializeWnd, and from the Loaded method when component streaming has been completed. It is also called when values in properties are changed, including: Min, Max, Position, Step, Orientation, Smooth, and BarShowText.

Applies property values to the widgetset class when the Handle is (re-)created.
TWinControl.InitializeWnd
Applies property values to the widgetset class when component streaming is completed.
TWinControl.Loaded
Gets the default size for new instances of the class.
TControl.GetControlClassDefaultSize
Constructor for the class instance.

Create is the overridden constructor for the class instance, and calls the inherited constructor on entry. Create sets component style flags needed for the control, and sets the default values for properties in the class instance.

TComponent.Create TWinControl.Create
Owner of the class instance.
Increments the Position for the progress bar by the value in Step.

StepIt is a procedure used to move the progress bar indicator from its current Position using the increment specified in the Step property. The value is Step is added to the value in Position. Position is range limited to the values in Min or Max if needed.

If the Handle for the control has been allocated, the SetPosition method in the widgetset class is called to apply the change in the Position property.

Use StepBy to apply an arbitrary increment value to Position.

Applies an arbitrary increment value to the Position for the progress bar.
Increment applied to the value in Position.
Specifies the maximum value for the Position in the progress bar.

Max is an Integer property which specifies the maximum value allowed in the Position property. The default value for the property is 100.

Set values for the Min and Max properties as needed to represent the task or operation. Or, use the SetParams method to set both Min and Max values at the same time.

Changing the value for the property causes the ApplyChanges method to be called.

Specifies the minimum value for the Position in the progress bar.

Min is an Integer property which specifies the minimum value allowed in the Position property. The default value for the property is 0.

Set values for the Min and Max properties as needed to represent the task or operation. Or, use the SetParams method to set both Min and Max values at the same time.

Changing the value for the property causes the ApplyChanges method to be called.

Specifies the orientation and direction for the progress bar.

Orientation is a TProgressBarOrientation property which indicates the orientation and direction for the progress bar. The default value is pbHorizontal, and orients the progress bar horizontally. As the value in Position is increased, the progress bar is moved from left to right.

See TProgressBarOrientation for the available values and their meanings.

Changing the value for the property causes the ApplyChanges method to be called.

The current position for the progress bar.

Position is an Integer property which contains the current position for the progress bar. The values in Position, Min, and Max determine the completion percentage and the length for the progress bar indicator when Style is set to pbstNormal.

Position must be in the range specified by the Min and Max properties. Setting a new value for the property causes the ApplyChanges method to be called. It validates and range limits property values before they are applied to the widgetset class.

Use StepIt and Step to increment the value in Position by a fixed value.

Use StepBy to increment the value in Position by an arbitrary value.

Indicates if the progress bar indicator is drawn as a smooth solid bar, as opposed to individual bar segments.

The implementation of Smooth drawing is platform-dependent. Some widgetsets do not use the segmented drawing style for their progress bars. For those platforms, the value in the property is not used.

Use Style to control whether a normal progress bar is drawn, or if an animated marquee is used in the progress bar indicator.

Increment applied to the value in Position in the StepIt method.
Drawing style for the progress bar.

The default value for the property is pbstNormal, and causes a solid (or segmented bar) to be displayed. pbstMarquee causes the animated marquee-style progress bar to be displayed.

Indicates if status text is draw over the progress bar.

BarShowText some widgetsets allow text to be displayed on the bar to indicate its position and range of values. The implementation of BarShowText is platform-specific. If the widgetset does not display text on the progress bar, the value in the property is not used.

TProgress Bar
- a bar that depicts what proportion of a process has been completed.

TProgress Bar is a TCustomProgressBar descendant that implements a control which depicts the progress of a process, or the proportion of the process that has been completed. A series of colored rectangles appears in the control filling it from left to right or from top to bottom to represent the progress for the process.

How To Use Standard Controls
TUDAlignButton
- enumerated type contains constants for alignment of an UpDown button.
TUDOrientation
- enumerated type with constants for orientation of UpDown button (Horizontal or Vertical).
Indicates whether a value is being increased, decreased, or not changed.

TUpDownDirection is an enumerated type with values that indicates whether a value is being increased, decreased, or not changed in a TCustomUpDown control. TUpDownDirection is the type passed as an argument to TUDChangingEventEx event handlers.

The value is not changed in the control.
The value is increased in the control.
The value is decreased in the control.
Represents the buttons used in a TCustomUpDown control.

TUDBtnType is an enumerated type with values that represent the buttons used in a TCustomUpDown control.

Represents the Next (Up, Increase Value) button.
Represents the Previous (Down, Decrease Value) button.
TUDClickEvent
- generic event handling procedure for clicking on an UpDown button.
TUDChangingEvent
- generic event handling procedure for changes in UpDown button.
Specifies an event handler signalled with additional information when the value for a TUpDown control is about to change.
TCustomUpDown
- base class for TUpDown - a pair of arrow-like buttons which are used to increment or decrement some controlled variable; often attached to a scroll-bar but can also control a digital numeric display.

TCustomUpDown - base class for TUpDown - a pair of arrow-like buttons which are used to increment or decrement some controlled variable; often attached to a scroll-bar but can also control a digital numeric display.

The control definition itself does not specify the variable upon which the buttons operate. The application programmer is responsible for supplying an event handler for OnClick to determine which button has been selected (designated btNext or btPrev) and incrementing or decrementing the variable in the control with which the UpDown is associated.

The amount by which the variable is changed is set by the integer property Increment with the optional multiplier Thousands (a boolean property).

For example the UpDown control may be used to move a slider up and down a scale by a specified amount for each click; alternatively a number may be displayed in a text box and clicking the buttons of the UpDown control may increment or decrement the number displayed by a specified amount.

Indicates if the control depends on access to its WidgetSet class.

FUseWS is a private Boolean member used to indicate if the control depends on access to its WidgetSet class instance. The value in FUseWS is set in the constructor for the class instance.

FUseWS is used in the constructor to ensure that buttons are created for Prev and Next values when they are not part of the widgetset class implementation.

FUseWS is used in the InitializeWnd method to determine if the property values must be set in the widgetset class, including: MinPosition, MaxPosition, Position, Increment, Wrap, Orientation, and UseArrowKeys.

FUseWS is used in the UpdateOrientation method to determine whether the action is implemented in the widgetset class, or handled in TCustomUpDown.

FUseWS is used in the AdjustPos method to determine whether a change in the control value using its buttons is handled in the current class instance, or forwarded to the appropriate button click method in the widgetset class. Similarly, handling for mouse wheel events are determined using the FUseWS member.

Introduced in LCL version 2.1.0.
Indicates if the mouse pointer has entered the control.
True when the mouse pointer in within the bounds for the control.
Indicates if the mouse pointer has exited the control.
True when the mouse pointer is not in the client rectangle for the control.
Applies changes to the control value using its increment and decrement buttons.

AdjustPos is a method used to apply changes to the value for the control when the increment or decrement buttons are clicked. AdjustPos uses the value in the FUseWS member to determine if the change in value is handled in the widgetset class, or handled in TCustomUpDown.

Introduced in LCL version 2.1.0.
True when the position value is being incremented. False when being decremented.

InitializeWnd is an overridden method used to initialize the widgetset class for the control. InitializeWnd calls the inherited method. When the FUseWS member contains False, no additional actions are performed in the method. When it contains True, methods in its widgetset class are called to synchronize values in the Min, Max, Position, Increment, Wrap, Orientation, and UseArrowKeys properties.

Introduced in LCL version 2.1.0.
AssociateKeyDown
- protected procedure for dealing with action to be taken if an associate key (Shift, Ctrl or Alt) is pressed while the control is active.
OnAssociateChangeBounds
- event handler for a change in bounds of the associate control.
Event handler signalled when Enabled is changed for the associated control.
Event handler signalled when Visible is changed for the associated control.
Performs actions when a mouse wheel down event occurs for the control.
Performs actions when a mouse wheel up event occurs for the control.
Performs actions when a mouse wheel left event occurs for the control.
Performs actions when a mouse wheel right event occurs for the control.
Performs actions when the mouse pointer enters the control.
Performs actions when the mouse pointer leaves the control.
Applies the specified bounds to the control.
Sets the value for the Enabled property.
TControl.Enabled
New value for the Enabled property.
GetControlClassDefaultSize
returns its own defaults, overriding inherited values.
TControl.GetControlClassDefaultSize
Calculates the preferred width and height for the control.
CanChange
- if True, control can be changed.
Notification
calls inherited method; if the operation requires removal of the associate control, this is performed.
TControl.Notification
Click
- calls OnClick event handler if it is assigned.
TControl.Click
AlignButton
- how to align the button: left or right.
ArrowKeys
- if True, the control can be operated by the keyboard's arrow keys which would simulate a click on the Next or Previous button.
Associate
- the associated control whose properties (controlled variable) are to be changed by the UpDown control.
The amount by which the controlled variable is to be increased or decreased on each click.
Max
- greatest value of controlled variable.
Min
- least value of controlled variable.
Minimum interval that must elapse before the action for the control is repeated.
MinRepeatInterval is a Byte property. The default value for the property is 100.
OnChanging
- event handler for a change in the value of the controlled variable.
Event handler signalled to determine if the control can change its value.
OnClick
- special event handler for a click on up or down button.

OnClick - special event handler for a click on up or down button.

The event handler must determine whether the [next] or [prev] button was clicked and therefore whether to increment or decrement the controlled variable and adjust the display.

Whether horizontal or vertical.
The Position of the UpDown control.
If True, multiply all displayed values and the Increment by 1000.
Indicates of the speed buttons for the control are drawn using a flat appearance.
If True, displayed control or value starts again from minimum or maximum value if clicking a button would cause incrementing or decrementing beyond the extreme value.
Create
- constructor for TCustomUpDown: calls inherited Create, initializes orientation, max and min, bounds, size and alignment.
TComponent.Create TCustomControl.Create
Destroy
- destructor for TCustomUpDown: removes connection with associate control and calls inherited Destroy.
TCustomControl.Destroy TComponent.Destroy
TUpDown
- a pair of arrow-like buttons which are used to increment or decrement some controlled variable; often attached to a scroll-bar but can also control a digital numeric display.

TUpDown - a pair of arrow-like buttons which are used to increment or decrement some controlled variable; often attached to a scroll-bar but can also control a digital numeric display

The control definition itself does not specify the variable upon which the buttons operate. The application programmer is responsible for supplying an event handler for OnClick to determine which button has been selected (designated btNext or btPrev) and incrementing or decrementing the variable in the control with which the UpDown is associated.

The amount by which the variable is changed is set by the integer property Increment with the optional multiplier Thousands (a boolean property).

For example the UpDown control may be used to move a slider up and down a scale by a specified amount for each click; alternatively a number may be displayed in a text box and clicking the buttons of the UpDown control may increment or decrement the number displayed by a specified amount.

Control notification message constant.
TToolButtonStyle
- enumerated type that determines the style of the tool buttons.

These are the possible values of Style:

- tbsButton - The button appears and functions like a normal button.
- tbsCheck - Clicking the button toggles the Down property. Once selected, the button remains selected until clicked again.
- tbsDivider - The button appears as a vertical line on the toolbar (used to separate other controls).
- tbsDropDown - The button displays a downwards-pointing arrow (suitable for accessing a drop-down menu).
- tbsSeparator - The button appears as an empty space on the toolbar (used to separate other controls).

The button appears and functions like a normal button.
Clicking the button toggles the Down property. Once selected, the button remains selected until clicked again.
The button displays a downwards-pointing arrow (suitable for accessing a drop-down menu).
The button appears as an empty space on the toolbar (used to separate other controls).
The button appears as a vertical line on the toolbar (used to separate other controls).
Represents flag values that can be used in a TToolButton instance.

Values from TToolButton are stored in the TToolButtonFlags set type.

The tool button is in a pressed or down state.
The drop-down indicator is in a pressed or down state.
The mouse cursor is hovered over the drop-down indicator.
The the drop-down menu for the tool button is visible.
Set type used to store values from the TToolButtonFlag enumeration.
TToolButtonActionLink
- links a ToolButton on the ToolBar to an Action on an ActionList.
AssignClient
calls inherited method then sets client as ToolButton.
TBasicActionLink
SetChecked
- stores the Checked status (True or False).
SetImageIndex
- stores the index value of the associated image.
TToolButtonActionLinkClass
- class of TToolButtonActionLink.
TToolButton
is a button control used in a TToolBar object.

Use TToolButton to implement buttons on a toolbar. While other controls (including TButton and TSpeedButton) can be placed on toolbars, TToolButton utilizes special toolbar features to simplify the configuration of buttons and offers added display options such as edge borders and transparency.

To place tool buttons on a toolbar at design time, select the toolbar, right-click, and choose New Button.

TButton TSpeedButton How To Use Standard Controls
Default width for tool buttons using the separator style.
Default width for tool buttons using the divider style.
Default width the drop-down indicator in tools buttons.
Member variable with the tool bar where the button is used.
Copies properties from the specified menu item.

CopyPropertiesFromMenuItem is a method used to copy property value from the menu item in Value into the current class instance. This ensures that the button has the same settings and behavior as the menu item assigned to the button.

No actions are performed in the method when Value has not been assigned (Nil). Calls BeginUpdate on entry, and EndUpdate when the method is completed.

The following properties are copied from the menu item in Value:

| Source Property (in TMenuItem) | Target Property (in TToolButton)
Action | Action
Caption | Caption
Checked | Down
Enabled | Enabled
Enabled | Enabled
Hint | Hint
ImageIndex | ImageIndex
Visible | Visible

CopyPropertiesFromMenuItem is called from the Loaded method when LCL component streaming has been completed, and when a new value is assigned to the MenuItem property.

TMenuItem
Menu item with the properties copied in the method.
Gets the class type for the ActionLink in the tool button.

GetActionLinkClass is overridden in TWToolButton to return the TToolButtonActionLink type in TToolButton.

TControl.GetActionLinkClass TControlActionLinkClass
Class type for the ActionLink in the tool button.
Implements the handler signalled when the Action for the tool button is changed.

ActionChange is an overridden method which implements an event handler signalled when the Action for the tool button is changed.

The Sender argument is the new TCustomAction instance assigned to the Action property for the tool button.

CheckDefaults indicates when values from the action are copied into the control. When set to True, the values in the Action are applied only when its property value has been assigned.

ActionChange calls the inherited method on entry to copy properties from Sender to the control. It provides support for translating the Checked property in the action to the Down property used in the tool button. It also changes the value in ImageIndex only when a valid image index has been assigned in the Action.

TControl.ActionChange
New action for the control, or Nil.
Indicates if the property in the action must be assigned (not empty).
Implements object persistence used to assign properties from the class instance to another persistent object.

AssignTo is an overridden method used to implement object persistence for the TToolButton class type. It allows properties in the class instance to be stored to the persistent object in Dest when it is a TCustomAction instance.

AssignTo calls the inherited method on entry to transfer common TCustomAction values to Dest. Additional properties in the tool button, like Down and ImageIndex, are handled as well.

TControl.AssignTo TPersistent.Assign TCustomAction
Persistent object where the property values are stored.
Starts an update process for the tool button.

Increments the internal counter used to consolidate calls to methods which layout or draw the control, or signal event handlers.

Use EndUpdate to end an update process for the control. The consolidated process(es) are performed when the internal counter reaches 0 (zero).

Ends an update process for the tool button.

Decrements the internal update counter used to consolidate calls to methods which layout or draw the control, or signal event handlers. The consolidated process(es) are performed when the internal counter reaches 0 (zero).

Use BeginUpdate to start an update process for the control.

Detects whether the mouse is hovered over the drop-down indicator for the tool button.

MouseMove is an overridden method in TToolButton used to handle mouse movement messages for the control. It provides support for detecting when the mouse pointer is hovered over the drop-down indicator for a tool bar button.

It calls the inherited method on entry to handle drag messages, and to signal the OnMouseMove event handler (when assigned).

If MouseCapture is not enabled for the control, and the button uses tbsDropDown in its Style property, the PointInArrow method is called is called to detect whether the mouse in inside the display area for the drop-down indicator. The value tbfMouseInArrow is include in or excluded from the flags for the tool button based on the return value from PointInArrow.

Invalidate is called to redraw the button if the flag values were modified.

MouseMove is called from the WMMouseMove message handler.

TControl.MouseMove
Shift, Ctrl, or Alt modifier for the mouse message.
Horizontal coordinate for the mouse message.
Vertical coordinate for the mouse message.
Handles mouse click events for the tool button.

MouseDown is an overridden method in TToolButton used to perform actions needed when a mouse down (or click) event is handled for the button control.

MouseDown updates flags for the button control to indicate whether a left mouse button event occurred over the Button or its drop-down indicator (when used). The inherited method is called to handle a control or a form focus change, and to signal the OnMouseDown event handler (when assigned).

If the mouse event is over the drop-down indicator, the DropDownMenu when its AutoPopUp property is enabled. This requires sending a LM_LBUTTONUP message to ensure that the feature works for all widgetsets.

If the mouse event is over the button, the Down property is set to True.

MouseDown is called from window message handlers for the control.

TControl.MouseDown
Mouse button for the mouse message.
Shift, Alt, or Ctrl modifier for the mouse message.
Horizontal coordinate for the mouse message.
Vertical coordinate for the mouse message.
Handles mouse up events for the tool button.

MouseUp is an overridden method in TToolButton used to handle mouse up message events.

TControl.MouseUp
Mouse button for the event.
Shift, Ctrl, or Alt modifier for the message.
Horizontal coordinate for the mouse message.
Vertical coordinate for the mouse message.
Handles a message sent when the mouse enters a control.
TControl.MouseEnter
Handles a message sent when the mouse lesaves a control.
TControl.MouseLeave
Handles the notification sent when a component is added to or removed from the control.
TComponent.Notification
Component for the notification message.
Operation performed for the component.
Draws the tool bar button to the Canvas for the control.

Paint is an overridden method in TToolButton, and provides nested routines used to draw the the tool button using the style, caption, and image for the control. Paint requires ToolBar to be assigned before it can render the button control using the routines in the overridden method. When ToolBar is unassigned, only the inherited Paint method is called.

Paint calculates the area display area for the button, and calls GetButtonDrawDetail to get the Theme Element Details for the control.

When an OnPaintButton event handler has been assigned for the ToolBar, it is used to render the button using the theme details. No additional actions are performed in the method.

When OnPaintButton is unassigned, the default drawing routines are used to render the button on the Canvas for the control. This includes decorations like a drop-down indicator, an image using the required state, the Caption text, button relief, and dividers or separators. Methods in ThemeServices are called to render the control to the Handle for the Canvas.

Paint calls the inherited method prior to exit to signal the OnPaint event handler (when assigned).

TGraphicControl.Canvas TGraphicControl.Paint TGraphicControl.OnPaint
Performs actions needed when the caption text for the tool button has been changed.

TextChanged is an overridden method in TToolButton used to perform actions needed when the caption text for the tool button has been changed. No actions are performed in the method if the parent tool bar has not been assigned for the tool button.

When ShowCaptions is enabled, the Invalidate method is called to force the tool button to be redrawn.

TextChanged is called when the CM_TEXTCHANGED control message is handled for the control.

TControl.TextChanged TControl.CMTextChanged
GetControlClassDefaultSize
returns its own defaults, overriding inherited values.
TControl.GetControlClassDefaultSize
Performs actions needed when LCL component streaming has been completed.

Calls the inherited method on entry. Calls CopyPropertiesFromMenuItem to apply values from MenuItem to the properties in the class instance.

TControl.Loaded TMenuItem
Refreshes the button control by updating it parent tool bar.
Sets the value for the internal member with the TToolBar instance for the button.
New value for the internal member.
Causes the tool bar to adjust the size and position for its Buttons and Controls.
Gets the Theme Element Details used for the tool button.

Uses values in Style, Enabled, and Down to determine the theme elements requested in the method. Calls ThemeElement.GetElementDetails to retrieve the theming details.

Called from the Paint method before the control is drawn.

Sets the value for the Parent property.

SetParent is an overridden method in TToolButton used to set the value for the Parent property.

SetParent ensures that the control in AParent is assigned, and allows child classes using the TToolButton class type. An EInvalidOperation exception is raised if the class instance cannot be a child control on AParent, or AParent is also the current class instance.

When the parent tool bar has been assigned, the tool button must be re-parented. The RemoveButton method in the tool bar is called to remove the button from its existing Parent. If AParent is a TToolBar instance, its properties are used to set the ButtonWidth and ButtonHeight for the control. The inherited method is called to update both the old and new Parent references and their control flags.

The value in the internal tool bar member is set to the value in AParent, and the AddButton method in the tool bar is called. The UpdateVisibleToolbar method is calls to align and re-display the button control (and its tool bar).

Raises an EInvalidOperation exception if the class instance cannot be a child control on the new Parent, or the new AParent is also the current class instance.
TControl.Parent TControl.SetParent
New value for the Parent property.
Calls the corresponding method in the tool bar for the button.

Calls a private method in the Parent control to update the tool bar buttons. No actions are performed if Parent is not a TToolBar instance, or unassigned.

TControl.Parent
Indicates if all buttons in the group are allowed to be in the 'Up' position.

Adjacent check box-style buttons (and their separators / dividers) with their Grouped property set to True are considered to be in the same group. GroupAllUpAllowed examines the adjacent tool buttons on the Parent tool bar to determine whether any of the grouped buttons have the AllowAllUp property set to True. When one grouped check-box button has AllowAllUp set, the remaining buttons in the group are treated in the same manner.

Change the Grouped property to False on a separator or divider to force the preceding or subsequent check-box buttons to be treated as a different group.
True when the AllowAllUp property is set for any of the adjacent grouped check-box buttons on the tool bar.
Clicks the button when the message contains the accelerator key for the button control.

Causes the tool button to be clicked when Message contains the accelerator key (shortcut) in the Caption for the button. ShowCaptions must be enabled in the Parent tool bar to allow the button to be clicked. If the message is not handled in the method, the inherited method is called.

The return value is True if the key message was handled as an accelerator key for the button control.

TControl.DialogChar
True If the message was handled as an accelerator key for the tool bar button.
Sets the value the AutoSize property and adjusts the control size when needed.

SetAutoSize is an overridden method in TToolButton used to set the value for the AutoSize property. It calls the inherited method to apply the new value for the property. It calls RequestAlign to adjust the size and alignment for the button control (and its siblings) on the Parent control.

TControl.SetAutoSize TControl.RequestAlign TControl.Parent
New value for the AutoSize property.
Constructor for the class instance.

Create is the constructor for TToolButton. It calls the inherited Create method, and sets the initial bounds for the control. Default values for style-related properties are also assigned.

TGraphicControl.Create TComponent.Create
Owner of the class instance.
Checks for and executes a drop-down menu for the tool button.

CheckMenuDropdown is a Boolean function used to check whether a drop-down menu can be displayed and executed for the tool button. The menu can be represented using either the DropDownMenu property (with its AutoPopUp property set to True) or the MenuItem property.

No actions are performed in the method at design-time, when the parent tool bar has not been assigned, or when neither DropDownMenu nor MenuItem has been assigned.

When a menu is available, the flags for the tool button are updated to include the value tbfDropDownMenuShown. The CheckMenuDropdown method in the parent tool bar is called to display and execute the drop-down menu, and get the return value for the method. The return value is True if the menu was successfully display and executed by the parent tool bar. The button flags are reverted prior to exiting from the method.

CheckMenuDropdown is called from the MouseDown method when the left mouse button is clicked on a button (or its drop-down indicator).

True if the drop-down menu for the button was successfully displayed and executed.
Signals the OnArrowClick event handler for the tool button.

ArrowClick is a method used to execute the OnArrowClick event handler (when assigned) for the tool button. ArrowClick is called from the MouseDown method when the left mouse button has been clicked on the drop-down indicator and the DropDownMenu for the button is not already visible.

See Click for information about the actions performed when the button has been clicked, instead of its drop-down indicator.

Gets the image list, index, and drawing effect for the icon on the tool button.

GetCurrentIcon is a method used to get information for the icon drawn on the tool button. It returns values in the variable parameters with the scaled image list for the icon, its position in the image list, and the drawing effect for the image.

ImageList is the scaled image list with the images from the parent tool bar. It is re-created in the method and uses the image size from the parent tool bar scaled to the run-time display density (PPI). The images in the list are retrieved from the Images, HotImages, or DisabledImages properties in the parent tool bar and reflect the values in the Enabled property and the tool button flags. The default value is Nil (unassigned).

TheIndex is the position in the image list for the icon image. It defaults to the value in the ImageIndex property.

TheEffect is a TGraphicsDrawEffect value that indicates the drawing effect to apply to the tool button. It reflects the values in the Enabled property, flags for the tool button, and the toUseGlyphEffects setting in ThemeServices. The following values are used in TheEffect:

gdeNormal
  Images are drawn using the normal, undecorated drawing effect. This is the default value.
gdeShadowed
  Images are drawn using the shadowed effect when the button or drop-down indicator is pressed.
gdeHighlighted
  Images are drawn using highlighting when the button is Enabled and auto-effects are used in theme services. Otherwise, the tool bar HotImages or DisabledImages are used.
gdeDisabled
  Images are drawn using the dimmed effect when the button is not Enabled, or tool bar DisabledImages are not available.

GetCurrentIcon is called from the Paint method.

Scaled Image list with the available images for the icon.
Ordinal position in the image list for the icon image.
Graphic drawing effect needed for the button state.
Returns default/preferred height and width, for use in auto-sizing.

Called during AutoSize calculations. Only positive values are valid. Negative or 0 are treated as undefined, and the LCL uses other sizes instead.

When WithThemeSpace is True, additional space is reserved for stacking.

Calls the inherited method on entry. Values from the ButtonWidth and ButtonHeight properties in the parent tool bar may be used in the PreferredWidth and PreferredHeight arguments, depending on the orientation for the tool bar. No additional actions are performed in the method if the parent tool bar has not been assigned.

TControl.GetPreferredSize
Index
- is the sequence number for the button in ButtonList.

Index is a read-only Integer property with the sequence number for the current button in the list of buttons. When the internal toolbar button list has been assigned, its IndexOf method is called to get the position for the current class instance in the toolbar control. When the internal toolbar is unassigned (contains Nil), the value -1 is used as the return value.

Indicates if the specified position is within the bounds for the arrow drawn on a drop-down button.
True when the coordinates are within the arrow for the drop-down.
Horizontal coordinate examined in the method.
Vertical coordinate examined in the method.
Indicates if all buttons in a group can have their Down property set to False.

AllowAllUp, when True, indicates that all buttons in a group are allowed to be 'Up' at the same time. The default value for the property is False, and indicates that one of the grouped buttons must have its Down property set to True.

Allows the control to grow to the size for its content.

Allows automatic adjustment of the size for the control, according to its content. The action performed depends on the control type. For example, a label or button can become bigger or smaller to accommodate a longer or shorter caption.

Default value for the property is False, and disables auto-sizing for the control instance.

The write access specifier is overridden in TToolButton to resize and align the tool button and its parent tool bar when needed.

TControl.AutoSize
Is this button Down (i.e. has it been selected)? Default false.

Down is a Boolean property which indicates if the tool button is in a "pressed" or "down" state. The default value for the property is False.

When the value for the property is changed to True in a check-box button (Style = tbsCheck), other buttons on the parent tool bar are also updated. Adjacent buttons with their Grouped property set to True are checked to ensure that their Down property is set to False. The button(s) are redrawn if their Down property was changed. The ToolButtonDown method in the parent tool bar is called to set the button state in the tool bar to the new property value. The button and the tool bar are redrawn following the change.

The drop-down menu that appears when the button is pressed.

A DropDownMenu that appears when this button is selected.

It uses the same code as a TPopupMenu and offers a series of additional menu choices.

Determines whether the button can respond to click events, and how it is displayed.

Enabled is a Boolean property which determines whether the tool button can respond to mouse click events at run-time. Enabled, along with Down, Style, and values in the tool bar flags influence how the button is rendered in the Paint method.

The value for the property may be changed in the CopyPropertiesFromMenuItem method, or when the CM_ENABLEDCHANGED control message is handled for the button.

TControl.Enabled
Indicates if the tool button is a member of a group. The default value is False.

Is this button a member of a group?

This would mean behavior similar to the radio buttons in a TRadioGroup where only one button in the group can be selected, or the check boxes in a TCheckGroup where more than one item can be selected but the members of the group interact in some way.

Contains the height for the control in pixels.

Height is an Integer property with the vertical size in pixels for the tool button. Height is normally set to the value in the ButtonHeight property for the parent tool bar.

TControl.Height
Ordinal position in an image list for the icon displayed on the tool button.

ImageIndex is a TImageIndex property with the ordinal position in an image list for the icon displayed on the tool button. It refers to a position in Images, HotImages, or DisabledImages in the parent tool bar. The default value for the property is -1, and indicates that an image has not been specified for the tool button. Changing the value for the property causes the tool button to be redrawn.

The property value may be changed in the CopyPropertiesFromMenuItem method when a MenuItem is assigned to the tool button.

ImageIndex is used in the Paint method to select the icon drawn on the tool button.

Indicates if the tool button is in an undetermined state.

Indeterminate is a Boolean property which indicates if the tool button is in an undetermined state and may not be applicable to the current context. Indeterminate means that the button is neither selected nor unselected, and normally causes it to be displayed with a "grayed" or "dimmed" appearance.

The default value for the property is False. When the property value is changed to True, the Down property is automatically set to False and the tool button is redrawn.

Indicates if the tool button is marked.

Marked is a Boolean property which indicates if the tool button is marked. The default value for the property is False.

Marked is provided for Delphi code compatibility; it is not used in the implementation of TToolButton or TToolBar.

Contains a menu item associated with the tool button.

MenuItem is a TMenuItem property which contains a menu item associated with the tool button.

Normally, a button on an application tool bar is associated with a menu item in the application. When a TMenuItem instance is assigned to the property, its property values are copied into the TToolButton instance using the CopyPropertiesFromMenuItem method. If MenuItem is set to Nil, a free notification is performed for the tool button instance.

When MenuItem has sub-menu Items, they are displayed as a drop-down when the tool button uses a drop-down Style.

Use DropDownMenu to specify a TPopupMenu instance that is displayed when the button (or drop-down indicator) for the tool button is clicked.

Event handler signalled when the drop-down indicator for a tool button is clicked.

OnArrowClick is a TNotifyEvent property with the event handler signalled when the drop-down indicator is clicked on a tool button using a drop-down Style.

OnArrowClick is signalled from the ArrowClick method (when assigned), and occurs when the left mouse button was clicked on the drop-down indicator. It is not executed if the DropDownMenu has already been displayed.

Use OnClick (or OnExecute in the Action) for the event handler signalled when the tool button was clicked.

OnClick
Event handler signalled when the tool button has been clicked.

OnClick is a TNotifyEvent property with the event handler signalled when the left mouse button is clicked on the tool button.

TControl.OnClick
Indicates if the Caption text is displayed on the tool button.

The ShowCaptions property in the parent tool bar takes precedence. Setting ShowCaption to False is relevant only when the List property in the tool bar is set to True.

Determines the display style of the tool button.

See TToolButtonStyle for the possible Style values.

Indicates whether the tool button is forced onto the next row on the parent tool bar.
Implements an enumerator for the buttons defined on a tool bar.
Constructor for the class instance.
Tool bar for the enumerator.
Moves to the next button instance for the enumerator.
Current button instance for the enumerator.
Specifies an event handler signalled to draw a button on a tool bar with a given state.

TToolBarOnPaintButton is an object procedure type that specifies an event handler signalled to draw a button on a tool bar with a given state. TToolBarOnPaintButton is the type used for the OnPaintButton property in TToolBar.

Object (TToolButton instance) for the event notification.
Drawing state for the button.
Contains values used as status flags in the TToolBar control.
Indicates the tool bar control needs to be redrawn.
Indicates a button or other control has been moved on a tool bar control.
Set type used to store values from the TToolBarFlag enumeration.
Implements an application tool bar with buttons or other visual controls.

TToolBar is TToolWindow descendant which implements a control used to arrange and display buttons and other controls. The buttons are used to provide direct access to features or functions in the application, much like a menu.

A tool bar is normally aligned to an edge for the parent control so that it spans its width or height. The default alignment places the tool bar along the top edge of the parent control.

In basic usage, TToolBar allows TToolButton instances with the same height and width to be added to the control. The buttons can be displayed as check boxes, drop downs (combo-boxes), or drop down buttons as well. The tool bar can be configured to display images and/or captions, as well as dividers (thin) or separators (dividers with extra spacing) between buttons.

Other visual controls can be created using the tool bar as the parent control. These controls are resized to the width or height (depending on alignment) for the tool bar.

The tool bar can be configured to wrap buttons or child controls when the controls will not fit within the dimension for the tool bar alignment. Other visual aspects can be controlled, like use of edges around the tool bar or a flat appearance.

Use the Buttons property to access and maintain the tool buttons on the control. Use Controls to access other visual control types on the tool bar.

Use the OnPaint event handler to perform custom drawing on the tool bar control when the Paint method is called. Use the OnPaintButton event handler to perform custom drawing for individual tool buttons on the control.

TToolBar is the ancestor for the TExtendedTabToolBar in the LazControls package.

TToolWindow
Assigns the Font for the control to each of its Buttons.

Called from the FontChanged method.

TControl.Font
Default width for tool buttons on the control.
Default height for tool buttons on the control.
Member which indicates if the previous tool bar orientation was vertical.
Indicates if the tool bar is oriented to display buttons and controls vertically.

IsVertical is a Boolean function in TToolBar used to determine if the tool bar displays its buttons or controls using a vertical orientation. The return value is determined by the value in the Align property, as follows:

alLeft, alRight
  The return value is True.
alNone, alClient, alCustom
  The return value is True when Height is larger than Width.

If the tool bar is parented by a TCoolBar control, the value in its Vertical property is used as the return value.

True when the buttons on the control are displayed vertically.
Registers the tool bar class in the widgetset.

Calls the inherited method on entry. Calls RegisterToolBar in the widgetset class to ensure that the TToolBar component is registered with the factory methods (when needed).

TLCLComponent.WSRegisterClass
Adjusts the client rectangle when the tool bar is drawn.

AdjustClientRect is an overridden method in TToolBar used to adjust the display area in ARect for the tool bar when the control is drawn.

It calls the inherited method on entry to shrink ARect when values have been specified in the EdgeBorders, EdgeInner, and EdgeOuter properties. It also increases the left coordinate for the rectangle by the value specified in the Indent property.

AdjustClientRect is called from the AlignControls and WrapButtons methods.

TWinControl.AdjustClientRect
Rectangle with the client display area.
Implements the storage specifier for the ButtonHeight property.
True when ButtonHeight is 0 or larger.
Implements the storage specifier for the ButtonWidth property.
True when ButtonWidth is 0 or larger.
Implements the storage specifier for the DropDownWidth property.
True when DropDownWidth is 0 or larger.
Gets the default size for new instances of the class type.

Uses a default size of 150 pixels (Width) by 26 pixels (Height).

TControl.GetControlClassDefaultSize
Defers auto-sizing actions to the AlignControls method.
Determines whether the specified button has a drop-down menu item which must be checked.

Called from the TToolButton.CheckMenuDropdown method when the tool button is clicked.

True if the menu item for the button was checked (clicked) in the method.
Tool button examined in the method.
Calls the Click method for the specified tool button.
Tool bar button executed in the method.
Performs actions needed when the Handle for the control is created.

Disables auto-sizing on entry, and re-enables auto-sizing prior to exiting from the method.

Calls the inherited method to update creation parameters and flags, and to initialize the window handle for the control. Calls UpdateVisibleToolbar to size and align the buttons and controls on the tool bar.

TWinControl.CreateWnd
Performs actions to align the tool bar buttons in the specified rectangle.

AlignControls is an overridden method in TToolBar and re-implements the method from the ancestor class. It does not call the inherited method.

No actions are performed in the method when tbfPlacingControls has already been included in the flags for the tool bar. This indicates that AlignControls has already been called, but not yet completed.

DisableAlign is called to prevent automatic alignment while the method is active. WrapButtons is called to position the buttons and controls in RemainingClientRect using the setting in Wrapable and the value from IsVertical. EnableAlign is called to re-enable alignment when the buttons have been positioned.

tbfPlacingControls is removed from the tool bar flags prior to exiting from the method.

TWinControl.AlignControls
Not used in the overridden method
Rectangle with the bounds where the tool bar and its buttons are aligned.
Gets the tool bar button with the specified accelerator key.

FindButtonFromAccel is a TToolButton function used to find the tool button with the accelerator key (virtual key code) value specified in Accel. FindButtonFromAccel visits the Visible and Enabled Buttons to find the TToolButton instance using the specified accelerator key in its caption. The return value is Nil if a tool button is not found using the specified accelerator key.

IsAccel
Tool button using the specified shortcut, or Nil when not found.
Shortcut or accelerator key to locate in the tool bar buttons.
Performs actions needed when the Font has changed for the control.

FontChanged is an overridden procedure which performs action needed when the Font for the control has been changed. FontChanged calls the inherited FontChanged method, and applies the new font to the Buttons in the tool bar. Values are reset in internal members used to track the realized height and width for buttons and drop downs in the tool bar.

TCustomControl.FontChanged
Performs actions needed when the control has finished loading from the LCL streaming mechanism.

Calls the inherited method on entry. Calls UpdateVisibleBar to adjust the size and layout for Buttons on the tool bar.

TWinControl.Loaded
Handles notifications for components added or removed from the control.

Calls the inherited method on entry. Ensures that the DisabledImages, HotImages, and Images properties are Nil'd if their image list is removed from the control.

TControl.Notification
Component of the notification message.
Action which triggered the notification.
Draws the tool bar on the Canvas for the control.

Paint is an overridden procedure used to display the tool bar. At design-time, a Red rectangle is drawn as a frame for the control. Paint calls the inherited Paint method to draw the inner and outer borders defined for the control. Paint signals the OnPaint event handler (when assigned) to perform drawing operations required for the tool bar.

Repositions the tool button at the specified position in Buttons.

Forces the entire tool bar to be redrawn. Not used in the current implementation.

Ordinal position in Buttons for the tool button moved in the method.
Repositions the tool buttons on the tool bar.

Forces the entire tool bar to be redrawn. Not used in the current implementation.

Not used in the method.
Adjusts tool button sizes and positions, and handles wrapping to new rows or columns.

WrapButtons is a Boolean function used to resize and position buttons on the tool bar. WrapButtons positions buttons from left to right in the client display area, and repositions any child control with its Align property set to clNone.

When Simulate is True, the child control sizes and positions are calculated but not applied to the tool bar.

Set Wrapable to text to allow a new row or column to be created when the cumulative button width is larger than the width for the tool bar. Or set the Wrap property in a specific tool button to True to force it and subsequent controls onto a new row or column.

This topic needs some work.

Handles the CN_DROPDOWNCLOSED control notification message.

Calls CloseCurrentMenu to hide an active drop-down menu displayed for the control.

The CN_DROPDOWNCLOSED message and parameters handled in the method.
Constructor for the class instance.

Create - constructor for TToolBar: calls inherited Create and sets many formatting and size defaults.

Among the variables initialized and defaults set are the list of buttons, button width and height, style, indentation, alignment, links for image change, the bounds and the edge borders.

TComponent.Create
Owner of the class instance.
Destroy
- destructor for TToolBar: frees buttons and links then calls inherited Destroy.
TCustomControl.Destroy TComponent.Destroy
Finishes an update process for the tool bar.

Calls the inherited method on entry. Updates the size and layout for Buttons when the internal update counter is 0 (zero) and tbfUpdateVisibleBarNeeded has been included in the flags for the control.

TToolWindow.EndUpdate TToolWindow.BeginUpdate
Disables reversing right and left alignment for child controls.
TWinControl.FlipChildren
Not used in the overridden method.
Gets a TToolBarEnumerator enumerator for the class instance.

Creates a new TToolBarEnumerator instance using the current control as the owner.

Tool bar enumerator created in the method.
Sets the width and height for Buttons on the control to the specified values.

SetButtonSize is a convenience method used to assign values for the ButtonWidth and ButtonHeight properties in a single method call. It is called when a new value is assigned to the ButtonWidth or ButtonHeight properties.

For example:

AToolbar.SetButtonSize(32, 30);

is equivalent to:

AToolbar.ButtonWidth := 32; AToolbar.ButtonHeight := 30;

The existing value in the property is kept when it is the same as the new value. No actions are performed in the method when neither value has been changed, or when BeginUpdate has already been called.

SetButtonSize visits each of the Buttons on the control to apply the changed values to the corresponding TToolButton properties. The button might not be updated if any of the following conditions are found.

For button width:

- The new value is 0.
- The new value is too small for the width needed in a check box or drop-down style button.
- The tool button has AutoSize enabled.
- The control is not derived from TToolButton.

For button height:

- In horizontal toolbars the height is set by the toolbar independent of the assigned size.

SetButtonSize calls the SetBounds method in each tool bar button to apply the values in NewButtonWidth and NewButtonHeight.

New value for the ButtonWidth property.
New value for the ButtonHeight property.
Always returns False for TToolBar.

The tool bar cannot be given focus, but its buttons or controls can.

TWinControl.CanFocus
Always returns False for TToolBar.
Number of Buttons defined for the tool bar control.

The property value is read from the Count property in ButtonList.

TList.Count
Lists with the tool buttons on the tool bar.

Buttons maintains a list of TToolButton instances. All tool buttons that share a TToolBar parent have the same height and (except for separators and dividers) the same width. Other controls on a toolbar are held in place by invisible separators, which are automatically created and destroyed.

To add tool buttons to the toolbar at design time, select the toolbar, right-click, and choose New Button. To create a space (separator) between one button and the next, select New Separator. To create a divider between buttons, add a button and set its Style property to tbsDivider. Other controls may be added to the toolbar directly from the Component palette.

Contains the Buttons defined for the tool bar control.

ButtonList is a read-only TList property which contains the TToolButton instances for the tool bar. It contains the values for the indexed Buttons property. It is also used in widgetset classes to access the buttons defined for the tool bar.

Number of rows needed to display the buttons for the control.

RowCount is a read-only Integer property with the number of rows needed to display the Buttons and Controls on the tool bar using its display settings. The value in RowCount is calculated in the WrapButtons method.

Width for the drop-down button indicator.

ButtonDropWidth is a read-only Integer property with the number of pixels needed for a drop-down button and its drop-down indicator.

Specifies the placement of the control inside its Parent.

Align is a TAlign property which specifies how the control is aligned to its parent control. The default value for the property is alTop in TToolBar.

TControl.Align
Contains the height for buttons on the tool bar control.

Use 0 for auto-sized value.

An internal member with the real height for buttons is maintained when reading or writing the value for the property.

Contains the width for buttons on the tool bar control.

Use 0 for auto-sized value

An internal member is maintained when reading or writing the value for the property.

List with images displayed when a tool button is not enabled.

DisabledImages is a TCustomImageList property with icon images displayed on tool buttons when they are not Enabled. Use Images for the images displayed when the tool button are enabled but not hovered. Use HotImages for the images displayed when tool buttons are hovered under the mouse cursor.

The image position for a tool button is stored in the ImageIndex property in the TToolButton instance.This requires the image at a given position in the image lists to target the same button on the tool bar control.

The image list should contain images which uses the sames width and height, and appropriately sized for the ButtonWidth and ButtonHeight for the tool bar. Use ImagesWidth to specify the size needed for tool button icons independent of the actual image size stored in the image lists.

When a new image list is assigned to the property, the tool bar is redrawn.

The image lists are used when the tool buttons get the current icon drawn in the Paint method.

TCustomImageList
Width of the drop down arrow button.

Use 0 for auto-sized value.

Indicates which edges on the tool bar are drawn with a border.

EdgeBorders is a TEdgeBorders property which indicates the edges to be drawn with a border on the control. It is redeclared in TToolBar to use the default value [ebTop].

Use EdgeInner and EdgeOuter to control the drawing style for the visible borders.

EdgeBorders is used in the inherited Paint method to render the control with borders in the specified positions using the drawing style in EdgeInner and EdgeOuter.

TToolWindow.Paint TToolWindow.EdgeBorders TEdgeBorders TEdgeBorder
Indicates if the control is drawn with a flat appearance.

Flat is a Boolean property which indicates if the control is drawn using a flat appearance (when True), or a raised drawing style (when False). The default value for the property is True.

Changing the value for the property causes the inherited Invalidate method to be called to refresh the control.

TWinControl.Invalidate
Height for the tool bar control.

Height is an Integer property re-declared in TToolBar to use a default value. The default value for the property is 32 (pixels).

TControl.Height
List with images displayed when a button is "hot" or hovered.

HotImages is a TCustomImageList property with icon images displayed on tool buttons when the mouse is hovered over the controls. Use Images for the images displayed when the tool button are enabled but not hovered. Use DisabledImages for the images displayed when tool buttons are not enabled.

The image position for a tool button is stored in the ImageIndex property in the TToolButton instance.This requires the image at a given position in the image lists to target the same button on the tool bar control.

The image list should contain images which uses the sames width and height, and appropriately sized for the ButtonWidth and ButtonHeight for the tool bar. Use ImagesWidth to specify the size needed for tool button icons independent of the actual image size stored in the image lists.

When a new image list is assigned to the property, the tool bar is redrawn.

The image lists are used when the tool buttons get the current icon drawn in the Paint method.

TCustomImageList
List with images displayed when a tool button is enabled.

Images is a TCustomImageList property with icon images displayed on tool buttons when they are enabled. Use DisabledImages for the images displayed when the tool button are not enabled. Use HotImages for the images displayed when tool buttons are enabled and hovered under the mouse cursor.

The image position for a tool button is stored in the ImageIndex property in the TToolButton instance.This requires the image at a given position in the image lists to target the same button on the tool bar control.

The image list should contain images which uses the sames width and height, and appropriately sized for the ButtonWidth and ButtonHeight for the tool bar. Use ImagesWidth to specify the size needed for tool button icons independent of the actual image size stored in the image lists.

When a new image list is assigned to the property, the tool bar is redrawn.

The image lists are used when the tool buttons get the current icon drawn in the Paint method.

TCustomImageList
Width for the images displayed on the tool bar.

ImagesWidth is an Integer property which indicates the width for images displayed on the tool bar. The default value for the property is zero (0).

Changing the value in the property causes the private UpdateVisibleBar method to be called to update control flags, and to resize both the control and its Buttons.

Number of pixels reserved as indentation spacing before buttons and controls on the tool bar.

Indent is an Integer property with the number of pixels reserved as indentation spacing before buttons and controls on the tool bar. The default value for the property is 1.

When the value for the property is changed, the tool bar is redrawn.

Indent is used in the AdjustClientRect method to increment the left edge of the display area for tool buttons on the control.

Indicates whether buttons on the tool bar are displayed using a list style.

List is a Boolean property which indicates if the buttons on the tool bar are displayed using a list style.

When List is set to True, the icon for a tool button is displayed on the left edge of the button immediately before the Caption text (when enabled). When set to False, the icon is centered in the button width and above the Caption text for the button.

The default value for the property is False. Changing the value for the property causes the tool bar to be resized and redrawn.

Set ShowCaptions to True to enable Caption text on the tool bar buttons.

Indicates whether captions are displayed on tool bar buttons.

ShowCaptions is a Boolean property which indicates whether caption text is displayed on tool bar buttons. The default value for the property is False. Changing the value for the property causes the tool bar to be redrawn.

ShowCaptions is used in the Paint method for the tool buttons on the control. When set to True, the caption text for a button is centered aligned at the bottom edge of the button. The icon for a button is drawn center aligned at the top edge of the button.

Use the List property (along with ShowCaption in the tool buttons) to display captions and icons using a list-style format where the icon and caption are on a single line.

Indicates whether the control is drawn with transparency.

Transparent is a Boolean property which indicates whether the tool bar is drawn with transparency. The default value for the property is False.

When set to True, the content for the Parent control can be seen beneath the unused areas on tool bar. Changing the value for the property causes control flags to be updated to add or remove csOpaque as needed, and the tool bar to be redrawn.

Controls wrapping of tool buttons to the next row when they are too long for the orientation on the tool bar.

Wrapable is a Boolean property which indicates if tool buttons can be wrapped to a new line when they are too long for the Align setting in the tool bar. The default value for the property is True. Changing the property value causes the child controls to be re-aligned, and the tool bar is redrawn.

Wrapable is used in the WrapButtons method.

TWinControl.ReAlign
Event handler signalled to draw a button on the tool bar.

OnPaintButton is a TToolBarOnPaintButton property which contains the event handler signalled when one of the Buttons on the tool bar is drawn.

OnPaintButton is signalled (when assigned) from the Paint method in TToolButton, and is used instead of the default drawing routines for the tool button. The Sender argument contains the TToolButton instance for the event notification. It is assumed that the event handler handles all aspects of drawing the button on the tool bar using the theme element details passed as an argument.

Event handler signalled when the Paint method is called for the control.

Signalled after the inherited Paint method has been performed. The Sender argument contains the TToolBar instance for the notification.

Represent drawing styles available for the grab bar in TCustomCoolBar.

TGrabStyle is an enumerated type with values used to represent drawing styles used for the grab bar (or gripper) in TCustomCoolBar. TGrabStyle is the type used to implement the GrabStyle property in TCustomCoolBar.

Drawn as a simple raised block.
Drawn as two thin raised blocks.
Drawn as equidistant horizontal lines.
Drawn as equidistant vertical lines.
Drawn as parallel rows of raised dots.
Drawn with a push button appearance.
Represents the drag actions for TCoolBar.
TDragBand
is an enumerated type with values that indicates the action performed when a TCoolBar band control is dragged. TDragBand is used in the implementation of TCustomCoolBar / TCoolBar.
No action. Do not allow dragging.
Move or re-order the band.
Resize the band.
Implements a band displayed on the TCoolBar control.

TCoolBand is a TCollectionItem descendant which implements a band displayed on the TCoolBar control.

A band contains a single Control that is displayed as a movable, sizable area on the TCoolBar control. It has a Grabber (sizing grip) that is used to move and resize the band. It can also have a bitmap image and text displayed at the start of the band prior its Control. The band be configured with a fixed size, and may occupy the entire width for the TCoolBar.

TCoolBand is the type used for the items in the TCoolBands collection.

Implements the storage specifier for the Bitmap property.
True when ParentBitmap is not set.
Implements the storage specifier for the Color property.
True when ParentColor is not set.
Gets the value for the Right property.
Value for the property.
Gets the value for the Visible property.
Value for the property.
Sets the value for the Bitmap property.
New value for the property.
Sets the value for the BorderStyle property.
New value for the property.
Sets the value for the Break property.
New value for the property.
Sets the value for the Color property.
New value for the property.
Sets the value for the Control property.
New value for the property.
Sets the value for the FixedBackground property.
New value for the property.
Sets the value for the HorizontalOnly property.
New value for the property.
Sets the value for the ImageIndex property.
New value for the property.
Sets the value for the MinHeight property.
New value for the property.
Sets the value for the MinWidth property.
New value for the property.
Sets the value for the ParentBitmap property.
New value for the property.
Sets the value for the ParentColor property.
New value for the property.
Sets the value for the Text property.
New value for the property.
Sets the value for the Visible property.
New value for the property.
Sets the value for the Width property.
New value for the property.
Default value for the MinHeight property.
Default value for the MinWidth property.
Default value for the Width property.
Default width used for dividers on the control.
Default indentation used for the grabber (sizing grip).
Left coordinate for the Control in the band.
Top coordinate for the Control in the band.
Width (pixels) for the value in the Text property.
Calculates the left coordinate for the Control in the band.

Reserves space needed for elements in the TCoolBand instance, including:

- Indent spacing for the Grabber (Sizing Grip)
- Horizontal spacing
- The space needed for the Text
- The space needed for the Image (scaled to the current PPI)

The return value contains the offset in the band where the Control is displayed.

Offset in the band where the Control is displayed.
Calculates the band height using the orientation and settings in the parent control.
Calculates the band width using the orientation and settings in the parent control.
Gets the number of pixels needed for Text using the Font in the parent control.
Gets the display name for the collection item.

Uses the value in Text (when assigned). Otherwise, the ClassName is used as the display name.

Constructor for the class instance.

Create is the overridden constructor for the class instance. Create sets the default values for properties in the collection item, including:

- Break (True)
- Color (clDefault)
- Control (set to Nil)
- FixedBackground (True)
- ImageIndex (-1)
- MinHeight (cDefMinHeight)
- MinWidth (cDefMinWidth)
- ParentBitmap (True)
- ParentColor (True)
- Visible (True)
- Width (cDefWidth)

Create calls the inherited method using aCollection as the owner of the collection item. An exception is raised if ACollection is not a TCoolBands descendant.

The internal TCoolBar reference in the class instance is set to the reference used in aCollection.

Create allocates resource needed for the Bitmap property, and sets its OnChange event handler to the InvalidateCoolBar method.

Collection which owns the items in the class instance.
Destructor for the class instance.

Frees resources allocated for the Bitmap property, and calls the inherited destructor.

Copies property values from the specified persistent object to the current class instance.

Assign is an overridden method which implements object persistence for the TCoolBand type. When ASource is a TCoolBand instance, the following properties in ASource are copied:

- Bitmap
- Break
- Color
- FixedBackground
- FixedSize
- HorizontalOnly
- ImageIndex
- MinHeight
- MinWidth
- ParentBitmap
- ParentColor
- Text
- Visible
- Control (when it exists in the parent control)

If ASource is not a TCoolBar instance, the inherited method is called to copy values in ASource.

TPersistent
Persistent object with property values copied in the method.
Gets the width needed for the band when its Control is auto-sized.
Causes the parent control to be redrawn when the collection item is changed.

Calls the inherited Changed method to update the current collection item, and to notify the parent control of a change to the collection.

Height needed for the band and its visual elements.

Height is a read-only Integer property with the height needed for the band and its visual elements including the Control. The value in Height is updated when the TCoolBar instance calls its CalculateAndAlign method, which occurs when the Update method for the collection is called.

Left coordinate for the band.

Left is a read-only Integer property with the horizontal coordinate for the band. Its value is relative to corresponding coordinate in the TCoolBar control. The value is assigned when the CalculateAndAlign method in the TCoolBar control is called, which occurs when the Update method for the collection is called.

Right coordinate for the band.
Top coordinate for the band.
Bitmap image displayed for the band.
Border style drawn around the band.

The default value for the property is bsNone, and indicates that borders are not drawn around the band.

Indicates whether the band starts a new row (or column) in the TCoolBar control.
Color for the band.

The default value for the property is clDefault. Please note that the default value for ParentColor is True, and causes the color defined for the TCoolBar control to be used.

Control displayed on the band.

Setting a new value for the property causes the Collection for the class to be updated. The existing control on the band is Nil'd and the new value is assigned. The Parent property in the control is set to the TCoolBar instance.

Indicates if a fixed background is drawn for the band.
Indicates whether the band is drawn with a fixed size.
Indicates if the band is limited to the horizontal orientation.
Ordinal position for the image displayed for the band.

Contains ordinal position in the TCoolBar.Images property with the image for the band.

Minimum height for the band.
Minimum width for the band.
Indicates if the Color in the Parent control (TCoolBar) is used for the band.
Indicates if the Bitmap in the TCoolBar control is used as the background for the band.
Text displayed as an identifier for the band.
Indicates if the band is visible.
Width for the band.
Implements a collection for TCoolBand items.

TCoolBands is a TCollection descendant used to store TCoolBand instances used the TCoolBar control. TCoolBands is the type used for the TCoolBar.Bands property.

TCollection
Gets the value for the indexed Items property.
Value for the indexed property.
Ordinal position for the collection item in the property value.
Sets the value for the indexed Items property.
Ordinal position in the collection for the property value.
New value for the indexed Items property.
Gets the owner for the persistent object.
TPersistent
Persistent object which owns the collection.
Updates the specified item in the collection, and updates the cool bar when needed.

Update is an overridden method in TCoolBands. It calls the inherited method on entry to notify observers that the collection item has changed. If a TCoolBar instance was assigned as the owner for the collection, its CalculateAndAlign method is called to layout and resize the visible bands for the control. The cool bar control is redrawn prior to exiting from the method.

Collection item updated in the collection.
Handles the notification that occurs when a collection item is added, extracted, or deleted.

Notify is an overridden method in TCoolBands, and calls the inherited method on entry to notify observers of the change to the collection item. If the collection item was added, its owner is set to the TCoolBar instance that owns the collection.

TCollectionItem TCollection TCollectionNotification
Collection item for the notification.
Action performed for the collection item.
Constructor for the class instance.

Create is the overridden constructor for the class instance. It calls the inherited method using TCoolBand as the ItemClass for the collection. It sets the owner of the collection to the value passed in the ACoolBar argument.

TCollection.Create TCollection.ItemClass
Control which owns the class instance.
Creates a new collection item and adds it to the collection.

Add is a TCoolBand function used to create and store a new collection item in the collection. The return value is the TCoolBand created and stored in the method. Add re-implements the method from the ancestor class to ensure that the collection item is a TCoolBand instance.

Collection item created and stored in the method.
Gets the collection item which contains the specified control.

FindBand iterates over the values in Items to locate the TCoolBand instance which contains the control specified in AControl. The return value is the TCoolBand instance in the collection, or Nil if AControl is not used in one of the collection Items.

Use FindBandIndex to get the ordinal position in the collection for the collection item which contains a specified control.

TCoolBand instance with the specified control, or Nil when not found.
Control to locate in the collection items.
Gets the ordinal position for the collection item which contains the specified control.

FindBandIndex is an Integer function used to get the ordinal position for the collection item which contains the control specified in AControl. FindBandIndex iterates over the values in Items to locate the TCoolBand instance whose Control property is the control specified in AControl. The return value is the position in the Items, or -1 if AControl is not used in one of the collection Items.

Use FindBand to get the collection item which contains a specified control.

Ordinal position for the collection item with the specified control, or -1 when not found.
Control to locate in the collection items.
Provides indexed access to the TCoolBand instances in the collection.

Items is a TCoolBand property which provides indexed access to the class instances in the collection. Values in the collection are accessed by their ordinal position. Items is the default property for the collection.

Use Add to create a new TCoolBand instance in the collection.

Use Delete and Clear to remove one or all items in the collection.

Ordinal position for the collection item.
Not used in the current LCL implementation.

BandMaximize is not used now but is needed for Delphi compatibility. It is not used in Delphi's TCoolBar implementation either.

Defines a Rebar-like control with resizable bands.

TCustomCoolBar is a TToolWindow descendant which defines a control like the Windows Rebar control. It provides a collection of windowed controls which are displayed in movable, resizable bands.

Each band (or TCoolBand) on the control can have a configurable sizing grip (or grabber), a bitmap, a text label, and a single windowed control. The CoolBar handles the size and position for the control when its band is moved. Each band can have a fixed size, or can automatically re-size to the contained control. Bands can be displayed one band per line, or re-sized and positioned to fill the available width or height for the CoolBar control.

A common use case is hosting multiple toolbars in an application. Separate TToolbar instance are created and configured with event handlers or actions as needed. Each toolbar is assigned as the control for a band. A perfect example is the Lazarus IDE, which uses TCoolbar to host the file, view and run toolbars in its interface.

Do not create instances of TCustomCoolBar; use the TCoolBar descendant which sets the visibility for the properties in the control.

Gets the value for the Align property.
Value for the property.
Determines if a band should wrap during alignment.
Sets the value for the BandBorderStyle property.
New value for the property.
Sets the value for the Bands property.
New value for the property.
Sets the value for the Bitmap property.
New value for the property.
Sets the value for the GrabStyle property.
New value for the GrabStyle property.
Sets the value for the GrabWidth property.
New value for the GrabWidth property.
Sets the value for the HorizontalSpacing property.
New value for the HorizontalSpacing property.
Sets the value for the Images property.
New value for the Images property.
Sets the value for the ImagesWidth property.
New value for the ImagesWidth property.
Sets the value for the ShowText property.
New value for the ShowText property.
Sets the value for the Themed property.
New value for the Themed property.
Sets the value for the Vertical property.
Sets the value for the Vertical property.
Sets the value for the VerticalSpacing property.
New value for the VerticalSpacing property.
Default value for the GrabStyle property.
Default value for the GrabWidth property.
Default value for the HorizontalSpacing property.
Default value for the VerticalSpacing property.
Free space below the last row.
Free space above the first row.
Members used for the realized EdgeBorders for the control.
Member used for the realized left border on the control.
Member used for the realized top border on the control.
Member used for the realized right border on the control.
Member used for the realized bottom border on the control.
Member used for the total width of realized borders on the control.
Member with the cursor shape when the mouse is over the cool bar background.
Member with the band being dragged in the control.
-1 indicates the space below the last row; other negative values are an invalid area.
Initial mouse X - position (for resizing Bands).
Member which indicates if the cursor shape can be changed for the control.
Member which indicates is bands are aligned in reverse (right-to-left) order.
Member with the calculated text height used on the control.
Member with the visible bands for the control.
Aligns the bands (and their controls) using the orientation, layout order, and anchors for the control.
TWinControl.AlignControls
Implements the OnChange handler used for Bitmap and Images.

Causes the control to be redrawn when an image or an image list is changed for the control.

Object (TCoolBar) for the event notification.
Calculates the preferred width and height for the control.
TWinControl.CalculatePreferredSize
True to reserve additional space for theme elements.
Calculates the size and position for visible bands using the orientation, layout, and order for the control.
Gets the real position for the band at the specified visible position.
Changes the cursor shape when a band, a grabber, or the control background is active.
True is a band is under the mouse pointer.
True is the grabber is under the mouse pointer.
Handles the CM_BIDIMODECHANGED message for the control.
Message examined in the method.
Creates the window handle for the control, and sets the cursor shape for the control background.
Calculates the text height and width in each of the bands when the font has been changed.

Uses the Canvas to get the text height for the control. No actions are performed in the method if the handle has not been allocated for the control Canvas.

Calls the CalcTextWidth method for each of the Bands on the control.

Tile draws the specified bitmap on the control Canvas to fill the area in ARect.
Rectangle where the bitmap is tiled.
Bitmap image drawn on the Canvas for the control.
Re-implements the OnChange event handler for the Font in the control.
Object (TCustomCoolBar) for the event notification.
Checks whether the band at the specified position is the first one on a row.

IsFirstAtRow is a Boolean function which indicates if the visible band at the specified position is the first band on its row.

ABand is the ordinal position for the requested band in the visible bands for the control. It represents an element in the internal array of visible TCoolBand instances populated in the CalculateAndAlign method.

IsFirstAtRow uses values from Vertical and IsRightToLeft to determine the orientation and order for the bands. The return value is True when the band at the specified position is the first one visually displayed on a given row.

IsFirstAtRow is used in MouseDown and MouseMove when handling drag messages to order the bands in the control.

True is the requested band is the left edge of the visible display area for the control.
Ordinal position for the visible band examined in the method.
Indicates whether the band at the specified position is the last one on a row.
Handles mouse down messages for the control.
TControl.MouseDown
Mouse button for the message.
Shift, Ctrl, or Alt modifier for the mouse message.
Horizontal coordinate for the mouse pointer.
Vertical coordinate for the mouse pointer.
Handles mouse move messages for the control.
Shift, Ctrl, or Alt modifier for the mouse message.
Horizontal coordinate for the mouse pointer.
Vertical coordinate for the mouse pointer.
Handles mouse up messages for the control.
Mouse button for the message.
Shift, Ctrl, or Alt modifier for the mouse message.
Horizontal coordinate for the mouse pointer.
Vertical coordinate for the mouse pointer.
Handles the notification when a component is added to or removed from the control.
Component for the notification.
Operation performed for the component.
Draws the visible bands for the control on its Canvas.
TToolWindow.Paint
Sets the value for the Align property.
New value for the Align property.
Sets the value for the AutoSize property.
TControl.AutoSize
New value for the AutoSize property.
Sets the value for the Cursor property.
TControl.Cursor
New value for the Cursor property.
Handles the LM_SIZE window message for the control.

Calls the inherited method on entry to realize the bounds and parent for the control. Calls CalculateAndAlign to layout and position the visible bands for the control.

Window message handled in the method.
Constructor for the class instance.

Allocates resources for the Bands property, and calls the inherited method. Sets the default values for properties in the class instance. Updates the control style flags to the values needed for the widgetset class. Methods in the class instance are assigned to the OnChange handlers for the Bitmap and Images in the class instance.

Owner of the class instance.
Destructor for the class instance.

Frees resources allocate in the Create constructor, and calls the inherited method.

Indicates if a band is automatically resized to its Control.
Ends an update process for the control.

EndUpdate is an overridden method in TCustomCoolBar. It calls the inherited method to decrement the internal update counter for the control. When the update counter reaches 0, the CalculateAndAlign method is called to size and layout the visible bands on the control. Temporarily disables auto-sizing while the control recalculates and aligns its bands. Calls Invalidate to force the control to be redrawn.

TToolWindow.EndUpdate
Causes the control to be redrawn.

Invalidate is an overridden method in TCustomCoolBar which forces the control to be redrawn using the settings in the EdgeInner, EdgeOuter, and EdgeBorders properties. CalculateAndAlign is called to size and layout the visible bands on the control. The inherited Invalidate method is called to update the widgetset class when its Handle has been allocated.

TWinControl.Invalidate
Inserts a band for the specified control at the ordinal position in Index.

InsertControl is an overridden method in TCustomCoolBar. It calls the inherited method on entry to align and parent the control in AControl.

No additional actions are performed in the method if AControl is not a TWinControl descendant.

InsertControl checks for an existing band in the Bands collection which uses the control in AControl. If one does not already exist, a TCoolBand instance is created for the control and stored in the collection.

TWinControl.InsertControl
Control for the TCoolBand instance created and stored in the method.
Ordinal position in Bands where the new band is stored.
Gets the position for the band under the mouse pointer.

MouseToBandPos is a method used to get the position for the band under the specified mouse coordinates.

ABand is an Integer output parameter with the position for the band under the mouse pointer. It can contain an ordinal position in the visible bands for the control, and can be in the range 0..Bands.Count-1. The upper limit may be smaller if any of the bands have their Visible property set to False.

ABand may contain a negative value, defined in the cNewRowAbove and cNewRowBelow constants, that represent the unused space above or below the bands on the control.

ABand is set to -2147483648 (the lowest value for an Integer) if the mouse pointer is positioned over the background for the control and not one of its bands.

AGrabber is a Boolean output parameter which indicates if the mouse pointer is positioned over the grabber (or gripper) for the band in ABand.

TCollection.Count
Horizontal coordinate for the mouse.
Vertical coordinate for the mouse.
Position for the band under the mouse pointer, or -2147483648 when not over a band.
Indicates if the mouse pointer is over the grabber for the band.
Removes the band with the specified control.
Control to locate in Bands.
Contains the edge in the Parent where the control is aligned.

Align is a TAlign property which is re-introduced in TCustomCoolBar to change its default value. The default value for the property is alTop.

Border style used around bands on the control.

BandBorderStyle is a TBorderStyle property with the border style used around the bands on the control. The default value for the property is bsSingle. Changing the value for the property causes the control to be redrawn.

TBorderStyle
Indicates the action used to maximize the width for a band on the control.

The default value for the property is bmClick, and indicates that single clicking on the background for a band causes it to be maximized.

Code comments say its not used. It is used in MouseUp. Also says it is defined but not used in VCL. Is that correct?

Collection with the bands defined for the control.
Optional image displayed as the background for the cool bar control.
Indicates if bands on the control have a fixed size.
Indicates if the order of the bands on the control is fixed or locked.
Drawing style used for a grabber or gripper displayed on the control.

GrabStyle is a TGrabStyle property with the drawing style used for a grabber or gripper displayed for the control. The default value for the property is defined in the cDefGrabStyle constant.

Width for the grabber on the control.

GrabWidth is an Integer property with the width for a grabber or gripper on the control. The default value for the property is cDefGrabWidth.

Horizontal space reserved between visual elements on the control.

HorizontalSpacing is an Integer property with the space reserved between visual elements on the control when the horizontal orientation is used. The default value for the property is defined in the cDefHorSpacing constant.

Contains images displayed on the bands for the control.
Width for the Images used in the control.
Indicates if text captions are displayed for the bands on the control.
Enables or disables themed rendering for the control.
Indicates if the control is displayed vertically instead of horizontally.
Vertical space reserved between visual elements in the control.
Event handler signalled when Bands are re-sized or re-ordered using the mouse.
Implements a Rebar-like control with resizable bands.

TCoolBar is a TCustomCoolBar descendant which implements a control like the Windows Rebar control. It provides a collection of windowed controls which are displayed in movable, resizable bands.

Each band (or TCoolBand) on the control can have a configurable sizing grip (or grabber), a bitmap, a text label, and a single windowed control. The CoolBar handles the size and position for the control when its band is moved. Each band can have a fixed size, or can automatically re-size to the contained control. Bands can be displayed one band per line, or re-sized and positioned to fill the available width or height for the CoolBar control.

A common use case is hosting multiple toolbars in an application. Separate TToolbar instance are created and configured with event handlers or actions as needed. Each toolbar is assigned as the Control for a band on the cool bar control. A perfect example is the Lazarus IDE, which uses TCoolbar to host the file, view and run toolbars in its interface.

Enumerated type with values that represent the orientation for a track bar.
Represents the horizontal orientation.
Represents the vertical orientation.
TTickMark
- enumerated type denoting position of tick marks relative to the track bar.
Tick marks are displayed on the bottom or right edge for the track bar orientation.
Tick marks are displayed on the top or left edge for the track bar orientation.
Tick marks are displayed on both edges of the track bar orientation.
TTickStyle
- enumerated type denoting style of tick marks.
Tick marks are disabled.
The tick mark count is determined using the Min, Max, and Frequency for a track bar control.
The number of tick marks is manually calculated. Used for the Mac OS Cocoa widgetset.
TTrackBarScalePos
- enumerated type denoting position of the scale for a track bar.
TCustomTrackBar
- the base class for TTrackBar.

TCustomTrackBar defines many of the properties inherited by TTrackBar, a device that allows the user to determine the value of a variable using a quasi-analog slider.

Sets the value for the Frequency property.
New value for the property.
Sets the value for the LineSize property.
New value for the property.
Sets the value for the Max property.
New value for the property.
Sets the value for the Min property.
New value for the property.
Sets the value for the Orientation property.
New value for the property.
Sets the value for the PageSize property.
New value for the property.
Sets the values in the Position, Min, and Max properties.
New value for the Position property.
New value for the Min property.
New value for the Max property.
Sets the value for the Position property.
New value for the property.
Sets the value for the Reversed property.
New value for the property.
Sets the value for the ScalePos property.
New value for the property.
Sets the value for the SelEnd property.
New value for the property.
Sets the value for the SelStart property.
New value for the property.
Sets the value for the ShowSelRange property.
New value for the property.
Sets the value for the TabStop property.
New value for the property.
Sets the value for the TickStyle property.
New value for the property.
Not used in the current LCL implementation.
Sends message to update the visual appearance of the object.
Signals the OnChange event handler (when assigned).
Performs actions needed to update the position for the track bar and signal the OnChange event.
Normalizes values in Min and Max, and ensures that Position is in range.
GetControlClassDefaultSize
- returns its own defaults, overriding the inherited values.
TControl.GetControlClassDefaultSize
Determines whether the width and height for the control are automatically resized.
True if the value in Width should be resized.
True if the value in Height should be resized.
Constructor for the class instance.

Create is the overridden constructor for TCustomTrackBar, and calls the inherited method on entry.

Create sets the default values for properties and members in the class instance, including the component and control style flags. The initial bounds for the control are set to the values from the GetControlClassDefaultSize method.

TWinControl.Create
Owner of the class instance.
Sets the position for the tick mark displayed on the track bar control.
Position for the tick mark (between Min and Max).
Indicates the frequency of tick marks displayed for the control.
Increment applied to the slider position when an arrow key is pressed.
Maximum value or position for the track bar slider.
Minimum value or position for the track bar slider.
Event handler signalled when the Position in the control has been changed.
Indicates the horizontal or vertical orientation for the track bar control.
The increment for the slider position when PageUp or PageDown key is pressed.
Location of the slider on the track bar between the Min and Max values.
True if the values are displayed in ascending order from right-to-left.
Position where the scale is displayed.
This is a GTK-specific property.
Ending value for the selection range in the track bar control.
Starting value for the selection range in the track bar control.
Displays a selection range and indicators using the values in SelStart and SelEnd.
Enables or disables navigatiopn using the Tab key.

The default value for the property is True in TCustomTrackBar.

TWinControl.TabStop
Position for the tick marks relative to the slider in the track bar.

Tickmarks indicates where the ticks appear relative to the slider in the track bar control.

tmBottomRight
  Tick marks are displayed on the bottom for the horizontal orientation, and on the right for the vertical orientation.
tmTopLeft
  Tick marks are displayed on the top for the horizontal orientation, and on the left for the vertical orientation.
tmBoth
  Tick marks are displayed on both sides for the selected orientation.

Indicates the tick mark drawing style for the control.

tsNone
  Disables display of tick marks.
tsAuto
  Tick mark count is automatically calculated using Min, Max, and Frequency.
tsManual
  Used for Mac OS Cocoa. For other widgetsets, it displays the Selection Range markers but no other tick marks.

TTrackBar
: a device which allows the user to determine the value of a variable using a quasi-analog slider.

TTrackBar: a device which allows the user to determine the value of a variable using a quasi-analog slider.

The device looks like a slider-potentiometer control on a hi-fi amplifier and consists of a slider which can be moved along a bar using the mouse. Tick marks can be displayed along one or both edges, giving an indication of the proportion of the maximum value of the controlled variable that is being selected.

The Position property indicates the distance along the bar that the slider has been placed, either by the program or by mouse capture and movement.

In the example, movement of the slider is detected and shown in the associated TProgressBar.

How To Use Standard Controls
Class type used to create new TTreeNode instances.
Enumerated type denoting the state for a TreeNode.

TNodeState is an enumerated type with values representing the state a tree node. The values reflect the settings in property values in a TTreeNode instance, or the use a node in a tree structure. Value(s) from the enumeration are stored in the TNodeStates type.

Cut has been set in the the TTreeNode.
DropTarget has been set in the TTreeNode.
Focused has been set in the TTreeNode.
Selected has been set in the TTreeNode.
MultiSelected has been set in the TTreeNode.
Expanded has been set in the TTreeNode.
HasChildren has been set in the TTreeNode.
Deleting has been set in the TTreeNode.
Visible has been set in the TTreeNode.
The tree node is bound to a tree (has a Parent) or is a top-level node.
The tree node has child nodes and a value assigned to its HasChildren property.
Set type used to store TNodeState value(s).
TNodeStates
is a set type used to store zero or more values from the TNodeState enumeration. TNodeStates is the type used to implement the TTreeNode.States property.
Location where a new tree node is attached to its Parent, Child, or Sibling nodes.
Add as the last sibling in a destination.
Add as the first sibling in a destination.
Add as the last child in a destination.
Add as the first child in a Destination.
Insert as the prior sibling for the specified node.
Insert as the next sibling for the specified node.
TAddMode
- enumerated type containing a series of constants to determine the place where a node should be placed in a tree.

This set is used in TTreeNode.InternalMove and TTreeNodes.InternalAddObject.

Adds the node as the first child.
Adds the node as the last child.
Adds the node in front another node.
Represents available multi-select styles.
Enables multi-select using Ctrl+Click to select an additional item.
Enables multi-select for a range of items from the current selection using Shift+Click.
Enables multi-select for visible (expanded) items only using Shift+Click.
Enables range multi-select for sibling items using Shift+Click.
Set type used to store value(s) from TMultiSelectStyles.

TMultiSelectStyle is a set type used to store zero or more values from the TMultiSelectStyles enumeration. TMultiSelectStyle is the type used to implement the TCustomTreeView.MultiSelectStyle property.

Pointer to a TTreeNode type which is the first instance in an allocated block of memory.
Exception type raised for an error retrieving a tree node.

ETreeNodeError is an Exception descendant with the base exception type raised for errors that occur when TTreeNode instances are retrieved. It is the ancestor for the ETreeViewError exception.

Exception type raised for errors in a tree view.

ETreeViewError is a ETreeNodeError descendant and the exception raised for errors in a tree structure.

Represents reason codes passed to event handlers when a tree node has been changed.

TTreeNodeChangeReason is an enumerated type with values that represent the reason code passed to event handlers when a tree node has been changed. TTreeNodeChangeReason is passed as an argument to the TTVNodeChangedEvent event handler.

The Node Text has changed.
The Node Data has changed.
The Node Height has changed.
The Node Image Effect has changed.
The Node Image Index has changed.
The Node Parent has changed.
The Node Visibility has changed.
The Node Overlay Index has changed.
The Node State Index has changed.
The Node Selected Index has changed.
A constant with the identifier for a LCL stream.
Specifies an event handler signalled when a tree node is about to be changed.

TTVChangingEvent is an object procedure type which specifies an event handler signalled when a tree node is about to be changed. TTVChangingEvent is the type used to implement the TCustomTreeView.OnChanging property.

Object for the event notification.
Specifies an event handler signalled when a tree node has been changed.

TTVChangedEvent is an object procedure type which specifies an event handler signalled when a node has been changed in a TCustomTreeView / TTreeView control.

Sender is the TObject instance for the change notification event.

Node is the TTreeNode instance that has been modified.

TTVChangedEvent is the type used for the TCustomTreeView.OnChange property.

Object for the event notification.
Tree node for the event notification.
Specifies an event handler signalled when values in a tree node have been changed.

TTVNodeChangedEvent is an object procedure type which specifies an event handler signalled when values in a tree node have been changed.

Sender contains the tree view control for the change notification.

Node is the TTreeNode instance with the modified value.

ChangeReason is a TTreeNodeChangeReason enumeration value that indicates the property changed in the tree node.

TTVNodeChangedEvent is the type used for the TCustomTreeView.OnNodeChanged property.

Object (tree view control) for the event notification.
Tree node with the modified value.
Indicates the value that was changed in the tree node.
TTVEditingEvent
- generic event handling method for editing a specified node if AllowEdit is True.
Specifies an event handler signalled when an edit action for a tree view control has been completed.
TTVEditedEvent
- generic event handling method for a node that has been edited.
TTVExpandingEvent
- generic event handling method for expanding a tree node if AllowExpansion is True.
TTVCollapsingEvent
- generic event handling method for collapsing a Tree Node if AllowCollapse is True.
TTVExpandedEvent
- generic event handling method for a Tree Node that has been expanded.
TTVCompareEvent
- generic event handling method for comparing two Tree Nodes.
TTVCustomDrawEvent
- generic event handling method for Tree View custom drawing.
TTVCustomDrawItemEvent
- generic event handling method for Tree View Item custom drawing.
Specifies an event handler signalled to draw a custom arrow (expand/collapse indicator) for a node on a tree view control.
TTVAdvancedCustomDrawEvent
- generic event handler method for Tree View advanced custom drawing.
TTVAdvancedCustomDrawItemEvent
- generic event handler method for Tree View Item advanced custom drawing.
TTVCustomCreateNodeEvent
- generic event handling method for Tree View node creation.
Specifies an event handler signalled to get the class type used to create a new node for a tree view control.
Specifies an event handler signalled to determine if a given tree node has child nodes.

TTVHasChildrenEvent is the type used for the OnHasChildren property in TCustomTreeView.

True if the specified node has child nodes.
Object (TCustomTreeView ) for the event notification.
Tree node examined in the routine.
TTreeNodeCompare
- generic function to compare Tree Nodes: returns -1 if Node1 is less than Node2, zero if equal, +1 if Node1 is greater.
TOldTreeNodeInfo
- record type (old version) for Tree Node information.
TTreeNodeInfo
- record structure for (new) Tree Node information.
Ordinal position of the image displayed for the tree node.
Ordinal position of the tree node in the list of selected nodes, or -1 when it is not selected.
Ordinal position for the image displayed to indicate the tree node state.
Ordinal position for the image displayed an overlay on the icon for the tree node.
Number of lines of text for the tree node.
Height (in pixels) for the rendered tree node.
True if the node is expanded to show its child nodes, or False when it is collapsed.
Total length (in bytes) for the text lines in the tree node.
A pointer to TDelphiNodeInfo.
TDelphiNodeInfo
- record structure for Tree Node information (for Delphi compatibility).
Contains data for an item displayed in a TTreeView control.

A TTreeNode is part of a TTreeView and is used to store the data displayed in the control. This can be done by using the Text property or for more complex data the Data property can be used. Each node can have sibling or child items associated with it.

How To Use Standard Controls
Performs a change notification for the node with the specified reason.

Calls the NodeChanged method in the associated TreeView control.

Indicates the property value that was changed in the tree node.
Gets the owner of the object instance.

The return value contains the TTreeNodes container which owns the class instance.

Persistent object which owns the object instance.
Constructor for the class instance.

Create is the constructor for TTreeNode, and calls the inherited Create on entry. Create sets the default values for properties and members in the class instance. The value in SubTreeCount is set to 1. The owner of the class instance is set to the TTreeNodes instance in AnOwner.

TObject.Create
Owner of the class instance.
Destructor for the class instance.

Destroy is the overridden destructor for TTreeNode.

It notifies the owner ( the TTreeNodes container) that the tree node and its accessibility object are being deleted. The Unbind method is called to remove any references to the node in the parent and sibling nodes, or as a selection in TreeNodes.

Child nodes are removed by setting HasChildren to False. Child nodes in Items are freed, and its storage is set to Nil.

The Pointer in the Data property is set to Nil.

Destroy calls the inherited method prior to exit.

TPersistent.Destroy
Sorts the top-level child nodes in Items.

Calls the CustomSort method to perform the default sort algorithm (alphabetic).

The return value is the result from the CustomSort method, and contains True on success.

True on success.
Gets the vertical coordinate for the bottom of the tree node.

Bottom is an Integer function used to get the vertical coordinate for the bottom of the tree node. The return value is calculated as the sum of the Top and Height properties.

Bottom coordinate for the tree node.
Gets the bottom coordinate for the last visible, expanded child node in the subtree.

BottomExpanded is an Integer function used to get the bottom coordinate for the node subtree when it is expanded.

If the tree node has a visible sibling, the value in its Top property is used as the return value. When a sibling node does not exist, the bottom coordinate for the last visible and expanded child node is used. If the current node does not have child nodes, the value in the Bottom property is used as the return value.

Bottom coordinate for the last node in the subtree.
CustomSort
- Sorts the child nodes using SortProc.

The child nodes (but not the grand-children) are sorted. If SortProc is Nil the method DefaultTreeViewSort is used. The default implementation always returns True.

Always returns True.
Sorting algorithm executed in the method, or Nil to use the default procedure.
DefaultTreeViewSort
- returns result of string comparison between names of Node1 and Node2

DefaultTreeViewSort - returns result of string comparison between names of Node1 and Node2.

DefaultTreeViewSort compares the text of two TreeNodes and returns the following result:

< 0
  if Node1.Text<Node2.Text.
0
  if Node1.Text=Node2.Text.
> 0
  if Node1.Text>Node2.Text.

The comparison takes into account ANSI characters, i.e. it takes care of strange accented characters. Contrary to AnsiCompareText, the comparison is case sensitive.

DisplayExpandSignLeft
- returns the position of the left edge of the expand / collapse indicator.
DisplayExpandSignRect
- returns the coordinates of the rectangle within which the expand sign are displayed.
Rectangle with the display area for the expand / collapse indicator.
DisplayExpandSignRight
- returns the position of the right edge of the expand sign (i.e. takes into account the width of the icon etc).
Rectangle with the display area for the expand / collapse indicator.
DisplayIconLeft
- returns the position of the actual icon for the expand sign (usually 1 pixel greater than DisplayExpandSignLeft).
DisplayRect
- returns the coordinates of the rectangle containing the current entry; if TextOnly is True, returns the coordinates for the text.
DisplayStateIconLeft
- returns the position of the State Icon.
DisplayTextLeft
- returns the position of the left edge of the text.
DisplayTextRight
- returns the position of the right edge of the text.
Edits the text for the node in the associated TreeView control.

EditText is a Boolean function used to start editing the Text for the tree node in the associated TreeView control. The return value is True when TreeView has been assigned and the value tvsIsEditing is present in the States property for the tree view control.

EditText calls the BeginEditing method in TreeView to configure, display, and activate the editor for the node.

Use EndEdit to close and optionally cancel the editing process in the associated TreeView control.

True if editing was enabled for the tree node in the method.
Gets the child node in Items with the specified text.

FindNode is a TTreeNode function used to get the child node with the text specified in NodeText.

FindNode examines the child nodes found in the Items property for the class instance. The GetFirstChild method is called to get the first child node in Items. Each tree node in Items is examined after calling GetNextSibling until a node with the requested value is located. The return value is the TTreeNode instance with a Text property that matches the value in NodeText, or Nil if a tree node is not found.

Use methods in the TTreeNodes container to locate tree nodes not in the current subtree; i. e. FindNodeWithText or FindNodeWithTextPath.

The TTreeNode instance in Items with the specified value, or Nil if not found.
Text for the node to retrieve from Items.
Gets the first child node in the Items property.

GetFirstChild is a TTreeNode function used to get the first child node in the subtree for the current tree node. GetFirstChild returns the first TTreeNode instance stored in the Items property (index position 0). The return value is Nil if Items is empty (Count is 0).

Use GetFirstVisibleChild to get the first child node with its Visible property set to True.

Use GetFirstSibling, GetNextSibling, GetPrevSibling, or GetLastSibling to retrieve a tree node at the same level in the tree hierarchy.

First tree node in the Items property, or Nil when Items is empty.
Gets the first tree node at the same level in the tree.

GetFirstSibling is a TTreeNode function which returns the first tree node at the same Level in the tree node hierarchy. The return value may be the same as the current class instance when it is the first (or only) node at the current Level.

When a Parent node has been assigned, its GetFirstChild method is used to get the return value. Otherwise, the internal linked list for the sub-tree is used to get the previous tree node as the return value.

First tree node at the same level.
Gets the tree node that is the first visible child node in the subtree.

GetFirstVisibleChild is a TTreeNode function used to get the tree node that is the first visible child node in the subtree.

GetFirstVisibleChild calls GetFirstChild to retrieve the first child node in Items. If the first child node is not visible, each of the TTreeNode instances in Items is examined after calling GetNextVisibleSibling.

The return value is the first TTreeNode instance with its Visible property set to True. The return value is Nil if no visible child node was found in Items.

Use GetLastVisibleChild to retrieve the last visible child node in Items.

Gets the value for the Handle property.

GetHandle is a THandle function used to get the value for the Handle property. It is the Handle allocated for the associated TreeView control.

Value for the property.
Gets the last node that is a top-level child node in the subtree.
TTreeNode instance that is the list node in Items.
Gets the last node at the same level as the current node.
GetLastSubChild
- returns the last sub-child node of this parent.
Gets the last child node in Items with its Visible property set to True.
Gets the next node in the tree.
GetNextChild
- returns the next child node of the parent specified by AValue.
GetNextExpanded
- returns the next expanded node.
GetNextMultiSelected
- returns the next node in a multi-selection.
GetNextSibling
- returns the next node in the same level as the current node.
Gets the next sibling node for the current tree node, or Nil when a sibling does not exist.
Gets the next visible node.

GetNextVisible is a TTreeNode function used to get the next visible node for the current tree node.

If the current tree node is Expanded and Visible, the next node is the first visible child node. Otherwise, the next visible sibling node is used as the next node. If a sibling node does not exist, the Parent is searched for a visible sibling (next visible ancestor?).

The return value is Nil if a visible node is not found using the preceding logic, or when none of the ancestor nodes are visible and expanded.

Next node in the tree node navigation order, or Nil.
Gets the next visible node at the same level in the tree.
GetParentNodeOfAbsoluteLevel
- returns the parent of all nodes at this absolute level.
Gets the previous node in the tree.
Gets the previous child node starting at the specified child node.
Node which is the previous child node.
Node which is the previous sibling for the specified child, or Nil.
GetPrevExpanded
- returns the previous expanded node.
GetPrevMultiSelected
- returns the previous node in a multi-selection.
GetPrevSibling
- returns the previous node in the same level as the current node.
GetPrevVisible
- returns the previous visible (not hidden) node.
Gets the previous visible sibling tree node for the current node.
GetTextPath
- returns a string containing the path to the current node delimited by slash.
HasAsParent
- returns True if the node specified by AValue has a parent node.
Get the index position for the specified child tree node.

The return value is -1 if the tree node in AValue is not a child node (its Parent node is not the current class instance). Calls GetIndex to calculate the position of the child node relative to previous sibling nodes. Roughly equivalent to calling IndexOf in the Items container, but using a TTreeNode search value instead of a String.

Ordinal position for the specified child node, or -1 when not a child node.
Child node to locate in Items.
IndexOfText
- returns the index of the node containing the specified Text string.
Assign
- if Source is of correct type, copies details directly, otherwise calls inherited Assign which probably raises an exception.
TPersistent.Assign
Persistent object with properties copied in the method.
Collapses the current tree node, and optionally collapses any descendent nodes.
True to collapses all descendent nodes in the subtree.
ConsistencyCheck
- makes sure all references to and from the node are consistent.
Frees the current tree node when the Deleting property is not True.

Delete is a method used to remove the tree node from the TTreeNodes container. Delete calls Free to destroy the object instance if the Deleting property is not set to True. No actions are performed when Deleting is True.

DeleteChildren
- remove the descendent Nodes in the tree structure.
Ends editing of the tree node in the associated tree view control.
True if the edited value for Text is discarded.
Expands the current tree node, and optionally all descendent nodes.

Calls the ExpandItem method to implement the expansion and optional recursion.

True to expand all descendent nodes.
Expands any tree node which is an ancestor of the current node.
Frees the Pointer in Data, including any child nodes in Items.
Forces the node tree node to become visible.

Calls the EnsureNodeIsVisible method in the associated TreeView (when assigned). Otherwise, calls the ExpandParents method.

MoveTo
- method for relocating a node to the specified Destination using the specified mode of attachment.

MoveTo - method for relocating a node to the specified Destination using the specified mode of attachment.

Definition of the modes of attachment:

naAdd
  Add as last sibling of Destination
naAddFirst
  Add as first sibling of Destination
naAddChild
  Add as last child of Destination
naAddChildFirst
  Add as first child of Destination
naInsert
  Insert in front of Destination
naInsertBehind
  Insert behind Destination

MultiSelectGroup
- method for multi-selecting a group of nodes.
Redraws the associated TreeView control if an update is not already in progress.
WriteDebugReport
- for debugging. If Recurse is True, report for all descendants as well.
AbsoluteIndex
- the absolute index of the current node, i.e. without taking into account the level of ancestry.
The number of nodes where the current node is the parent node.
Contains the same value as the Count property in Items.
Indicates if the tree node has been cut from the tree structure.

Cut is a Boolean property which indicates if the tree node has been cut from the tree structure. The property value is True when nsCut has been included in the States property for the tree node. Changing the value for the property causes the States property to be updated to include or exclude the node state value.

Pointer to the custom data for the node.

Data is a Pointer property with a pointer to the custom data for the node. Data can contain any arbitrary data type, and must be cast to the correct types when used in an application.

Setting a new value for the property causes the associated TreeView (when assigned) to sort the parent node or all of the TreeNodes when needed and allowed. It is needed when the tree view uses SortType stData or stBoth. It is allowed if the node is not being deleted and is bound to other tree nodes (States).

The Changed method is called with the ncDataChanged node change reason.

True if the node has been marked for deletion in the associated tree view control.

Deleting is a read-only Boolean property which indicates is the node is marked for deletion. Its value is True when ndDeleting has been included in the States property for the node. nsDeleting is added to States in the Destroy method, and indicates that the node will be freed. The Delete method in the TreeView control is called to signal an OnDeletion event (when assigned) before references for the node are removed and the TreeNodes are refreshed. It prevents the Delete method from being executed more than once.

True if the node is a drop target in a drag and drop operation.

DropTarget is a Boolean property which indicates if the node is a drop target in a drag and drop operation. The value for the property is True when nsDropHilited has been included in the States property.

Setting a new value for the property causes States to be updated to reflect the new value. When set to True, nsDropHilited is included in State and the internal last drop target is updated in the associated TreeView control. When set to False, nsDropHilited is excluded from States and the last drop target is set to Nil in the TreeView control.

True if the node has been expanded, False when collapsed.

Expanded is a Boolean property which indicates if the node has been expanded in the associated TreeView control. The property value is True when nsExpanded has been included in the States property.

The Expand method is called when the new value for the property is True. Otherwise, the Collapse method is called. States is updated in the Expand and Collapse methods.

True if the node has focus in the TreeView control.

Focused is a Boolean property which indicates if the node has focus in the associated TreeView control. The value for the property is True when nsFocused has been included in the States property.

Setting a new value for the property causes the values in States to be updated. When set to True, nsFocused is included in States. When set to False, nsFocused is excluded from States. The Update method is called to force the TreeView control to be redrawn.

Handle for the tree view control which owns the TreeNodes container and the tree node.

THandle is a read-only THandle property with the handle assigned for the associated TreeView control. The property value is 0 (zero) if a handle has not been assigned for the TreeView control.

Indicates whether the tree node has child nodes.

HasChildren is a Boolean property which indicates whether the tree node has child nodes.

The property value is True when States includes the value nsHasChildren. Items is not used to determine the property value.

Setting a new value for the property causes States to be updated to include or exclude nsHasChildren to reflect the new value. When the value is False, child nodes in the Items property are freed.

The Update method is called to refresh the associated TreeView control (when assigned).

The height for the node including its text, images, and indicators.

Height is an Integer property with the height for the node including its text, images, and indicators.

Height uses a default value if it contains 0 (zero) or a negative integer value. If an associated TreeView control has been assigned, the value in its DefaultItemHeight property is used as the property value. If TreeView in unassigned, the value in the DefaultTreeNodeHeight constant is used.

Setting a new value for the property causes the States property in the associated TreeView control to be updated (when assigned). The values tvsScrollbarChanged and tvsTopsNeedsUpdate are included in the control States. The Update method is called to force the TreeView to be redrawn. The Changed method is called with the ncHeightChanged node change reason.

Height is used along with Top to calculate the return value for the Bottom method. It is also used in the implementation of methods like DisplayRect and DisplayExpandSignRect.

Ordinal position for the image displayed for the node, or -1 when no image is assigned.

ImageIndex is an Integer property with the ordinal position for the image displayed for the node. It refers to a bitmap stored in the Images property of the associated TreeView control. The default value for the property is -1, and indicates that an image has not been assigned.

Setting a new value for the property causes the Update method to be called to redraw the associated tree view control. The Changed method is called with the ncImageIndex node change reason.

Ordinal position for the node in its parent node.
Returns the number of previous siblings (nodes on same level in the parent node).
True if the entire node is visible in the display area for the associated TreeView control.

IsFullHeightVisible is a read-only Boolean property which indicates if the entire tree node is visible in the display area for the associated TreeView control.

The IsNodeHeightFullVisible method in TreeView is called to get the value for the property. If the TreeView control has not been assigned, the AreParentsExpandedAndVisible method is used to get the return value.

IsFullHeightVisible is used in the SelectionVisible method in TCustomTreeView when MultiSelect has not been enabled for the tree view control.

True if the node is visible.

IsVisible is a read-only Boolean property which indicates if the tree node is visible in the associated TreeView control. IsVisible is True if the node can be seen in the display area for the control. The property value is False when an ancestor node is collapsed (not Expanded).

The IsNodeVisible method in TreeView is called to get the value for the property. If TreeView has not been assigned, the AreParentsExpandedAndVisible method is called to get the property value.

IsNodeVisible is used in the Repaint method in TTreeNodes, and in the SelectionVisible method in TCustomTreeView.

Provides indexed access to the child nodes for the current node.

Items is an indexed TTreeNode property which provides access to the child nodes for the current node by their ordinal position. ItemIndex contains the ordinal position for the tree node instance, and must be in the range 0..Items.Count-1. An ETreeNodeError exception is raised if ItemIndex is not in the range needed for the Items property.

Items is the default property for the class instance.

Storing a new value to the indexed property causes the Assign method in the TTreeNode instance to be called to copy the properties values.

Ordinal position for a child node.
The number of ancestor nodes for the current tree node.

Level is a read-only Integer property which contains the level in the tree structure for the node. It indicates the number of ancestor nodes in the structure, and implies the indentation for the node in the tree view control.

The root of the tree is level 0. The value for the property is determined by counting the number of Parent nodes for each TTreeNode instance in the tree starting at the current node.

MultiSelected
- if True, several nodes have been selected simultaneously (e.g. using the Shift or Ctrl key while selecting).
Graphic drawing effect applied to the node in the associated TreeView control.
Ordinal position for the overlay image used for the node.
This icon is drawn above the normal icon. If Images.HasOverlays then it is fetched from Images via Images.Overlay(Node.Overlay) for Delphi compatibility.
Owner of the tree node instance.

Owner is a read-only TTreeNodes property with the container that owns the current TTreeNode instance.

Parent node for the current tree node.

Parent is a read-only TTreeNode property which contains the parent node for the current tree node.

Use Items to access and maintain the child nodes for the current tree node.

True if the current node is selected in the tree view control.

Selected is a Boolean property which indicates the current node is selected in the associated TreeView control. The property value is True when nsSelected or nsMultiSelected has been included in the States property. nsSelected indicates that the node is assigned to the TCustomTreeView.Selected property. nsMultiSelected indicates that the node is stored in the the TCustomTreeView.Selections property when it has MultiSelect enabled.

Setting a new value for the property causes the values in States to be updated. Similarly, the TreeView control is updated to used the node in the Selected or Selections property.

The Update method is called to force the TreeView control to be redrawn.

Ordinal position for the image displayed when the tree node is Selected.

SelectedIndex is an Integer property with the ordinal position for the image displayed when the node is Selected. It refers to a bitmap in the Images property for the TreeView control, and allows an alternate image to be displayed for the node when it is selected. The default value is -1 and indicates that an image index has not been assigned.

Changing the value in the property causes the Update method to be called to redraw the associated TreeView control. The Changed method is called with the ncSelectedIndex node change reason.

Use ImageIndex to set the ordinal position for the image displayed when the tree node is not selected.

StateIndex
the index of the state (within an enumerated type).

StateIndex the index of the state (within an enumerated type).

Definition of enumerated type NodeState:

nsCut, nsDropHilited, nsFocused, nsSelected, nsMultiSelected, nsExpanded, nsHasChildren, nsDeleting, nsBound

Contains active state flags for the tree node.

States is a read-only TNodeStates properties which contains active state flags for the tree node. TNodeState enumeration values are included in or excluded from the set type as needed in methods for the tree node, the TreeNodes container, and the associated TreeView control.

The number of subtrees in the ancestor nodes for the class instance.
Text displayed for the tree node.

Text is a String property which contains the text displayed as the caption for the tree node.

Changing the value in the property causes the TreeView control to be updated. Its States property is modified to include the value tvsMaxRightNeedsUpdate, which causes the node sizes to be recalculated and the control to be re-displayed.

If the SortType for the TreeView is set to stText or stBoth, the Parent node is re-sorted. If the TreeView has not been assigned, the TreeNodes container is re-sorted.

The Changed method is called with the ncTextChanged node change reason.

Vertical coordinate for the top of the tree node.

Top is a read-only Integer property with the vertical coordinate for the top of the tree node. Top contains an Y-axis offset where the tree node is located in the display area for the associated TreeView control.

The property value is calculated by calling the UpdateAllTops method in the TreeView control. The value contains the accumulated Height for all preceding TreeNodes starting at the first visible node in the control, and reflects their Visible and Expanded settings. The value is calculated in UpdateAllTops when tvsTopsNeedsUpdate has been included in the States property for the TreeView control.

Use Height to get height for the text, images, and indicators used in a tree node. Use Bottom to get the vertical coordinate for the bottom of the tree node.

The container where the tree node is stored, and the owner of the class instance.

TreeNodes is a read-only TTreeNodes property with the container where the tree node is stored, and the owner of the TTreeNode instance. TreeNodes provides properties and methods needed to store, access, and maintain the tree nodes for the TreeView control. TreeNodes is a reference to the Items property found in TreeView.

The property value is Nil if Owner has not been assigned or is not derived from TTreeNodes.

The tree view control where the node is displayed.

TreeView is a read-only TCustomTreeView property with the tree view control where the tree node and other nodes in TreeNodes are displayed. It is a reference to the Owner assigned to the TreeNodes property.

TreeView provides access to the properties, methods, and events in the control. It is used to get the position for the node in the display area for the control. It is also notified when property values in the node are changed.

Use TreeNodes to access the TTreeNode instances stored in TreeView.

True if the tree node is visible in the associated TreeView control.

Visible is a Boolean property which indicates if the tree node is visible in the associated TreeView control. Its value is True when nsVisible has been included in the States property for the tree node. The default value for the property is True.

Setting a new value for the property causes the States property to be updated. Selected is set to False when the value in Visible is changed.

Values are included in the States property for the associated TreeView control (when assigned) to indicate that the size and layout for the tree nodes in the control have been changed. The Update method is called to force the control to be refreshed. The Changed method is called with the ncVisibility node change reason.

Implements an enumerator for items in the TTreeNodes container.
Gets the value for the Current property.
Value for the property.
Constructor for the class instance.

Create is the constructor for the class instance, and calls the inherited method on entry. Create stores the value in ANodes in the TTreeNodes member. Creates set the default value for the internal position counter used in the class instance.

Container with the tree nodes visited in the enumerator.
Indicates if another tree node is available to the enumerator.

MoveNext is a Boolean function which indicates if another tree node is available to the enumerator. MoveNext increments the internal position counter for the enumerator. The return value is True if the position counter is less than the number of entries in the internal TTreeNodes container (in the range 0..TTreeNodes.Count-1).

Use Current to access the TTreeNode instance when MoveNext returns True.

True when more tree nodes are available in the internal container.
Gets the current tree node instance for the enumerator.

Use MoveNext to navigate to the first or subsequent TTreeNode instance for the enumerator. Raises an exception if Current is accessed before the MoveNext method is called to retrieve the first value for the enumerator.

PNodeCache
- pointer to TNodeCache.
TNodeCache
- a cache (temporary storage record) for a TTreeNode and its index.
Implements a container for TTreeNode instances.

TTreeNodes is a TPersistent descendant which implements a container used to store TTreeNode instances. TTreeNodes provides properties and methods used to create, store, access, and maintain nodes with a hierarchical tree structure.

The indexed Item property provides access to the nodes in the container by their ordinal position. An enumerator can also be used to access tree nodes in the container.

TTreeNodes is the type used for the Items property in TCustomTreeView.

Gets the handle for the TreeView component using the collection of nodes.
The handle for the TreeView, or 0 when TreeView is unassigned.
InternalAddObject
- method for adding text of data within the structure of the current node; returns the value of the new updated node.
Gets the value for the Count property.
Value for the Count property.
Gets the value for the Owner property.
Owner of the collection.
Assigns values from the specified tree node to a node in the container.
Ordinal position for the node updated in the container.
Tree node with the values assigned to an existing node in the container.
Constructor for the class instance.

Create is the constructor for the class instance, and calls the inherited method on entry. Create allocates resources for the internal selection list in the class instance. The value in AnOwner is stored in the Owner property.

TObject.Create
Owner for the class instance.
Destructor for the class instance.

Destroy is the overridden destructor for the class instance. Destroy calls Clear to remove TTreeNode instances stored in Item and values in the internal cache. The selection list for the class instance is also cleared, and its allocated resources are freed. Destroy calls the inherited method prior to exit.

TPersistent.Destroy
Adds a new tree node as a sibling of the specified node.
Tree node created and added in the method.
Tree node that is a sibling of the new node.
Text for the new tree node.
Pointer to the data for the new tree node.
Indicates the position for the new node relative to its sibling(s).
Adds a node tree with the specified text as a child of the specified parent node.
TTreeNode instance created in the method.
Parent node for the new node.
Text for the new tree node.
AddChildFirst
- adds a node with specified text as the first child of the parent node and returns the new node.
AddChildObject
- adds a child node with specified text and data-pointer to the parent node and returns the new node.
AddChildObjectFirst
- adds a node with specified text and data as the first child of the parent node and returns the new node.
AddFirst
- adds a node with specified text as the first node in the same level as SiblingNode. and returns the new node.
Adds or inserts a tree node as a sibling to a specified relative node.
Tree node with an updated Parent node after the operation.
Node added or inserted to the node tree for the relative node.
Tree node where the node will become a sibling.
Accessibility value for the tree node.
Pointer to the accessibility data for the tree node.
Method used to store the node: add or insert.
AddObject
- adds a node with specified text and data-pointer in the same level as SiblingNode. and returns the new node.
AddObjectFirst
- adds a node with specified text and data-pointer as the first node in the same level as SiblingNode. and returns the new node.
FindNodeWithData
- returns a node containing the specified data pointer.
Finds a node containing the specified text string.
Finds a node with the text ancestry specified in TextPath.

Returns the TTreeNode instance found which matches the text ancestry in TextPath, or Nil if a tree node is not found matching the specified values.

TextPath contains the delimited text values used to locate a tree node. The '/' (Slash) character is used as the delimiter between text values in TextPath. An initial slash character representing the root node is not needed or allowed. The search always starts at the top-level tree nodes in the container. The FindNode method is used to locate subsequent delimited text values in TextPath.

Tree nodes matching the specified text values.
Delimited text values used to locate the tree node.
Gets a top-level node containing the specified text.
Tree node with the specified text, or Nil.
Text to locate in the top-level siblings.
Gets the TTreeNodesEnumerator enumerator for the class instance.
TTreeNodesEnumerator instance created in the method.
GetFirstNode
- returns the first node in the collection.
Gets the first top-level tree node with its Visible property set to True.
GetLastExpandedSubNode
- absolute last node.
Gets the last top-level tree node in the container.
Gets the last child or descendent node in the last top-level node.
Gets the last top-level tree node with its Visible property set to True.
Gets the tree node at the specified position in the list of selected nodes.

Raises an ETreeNodeError exception if AIndex is not a valid ordinal position in the internal selection list. AIndex must be in the range 0..SelectionCount-1.

Tree node at the specified position in the selection list.
Ordinal position in the selection list for the node.
Inserts a node with the specified text before the specified node.
Inserts a new node with the specified text just after the specified node.
InsertObject
- inserts a new node with specified text and data just before the specified Next node and returns the new node.
InsertObjectBehind
- inserts a new node with specified text and data-pointer just behind specified Previous node and returns the new node.
True if the node is part of a multi-selection in the internal selection list.
True if the node is part of a multi-selection in the internal selection list.
Assign
- if Source is of correct type, copies properties directly, otherwise calls inherited Assign which probably raises an exception.
TPersistent.Assign
Starts an update process for the tree nodes in the container.
Removes tree nodes in the container and its internal cache.
ClearMultiSelection
- clears a series of nodes in a multi-selection (provided the selection has not already been cleared).
ConsistencyCheck
- makes sure all references to and from the nodes are consistent.
Removes the specified tree node from the container.
Tree node deleted in the method.
Finishes an update process for the tree nodes in the container.
Frees the pointer in the Data property for all nodes in the container.
Adds or removes the specified tree node to / from the internal selections list when its Selected property is changed.
Tree node added to or removed from the selections list.
True to add the node, False to remove the node in the selection list.
Clears any existing multi-selections and selects the specified node.
Node selected in the method.
Adds nodes relative the specified node to the multi-selection list.

MultiSelect is a method used add nodes to the internal selection list relative to the node specified in Node. MultiSelect uses values in the MultiSelectStyle property for the tree view control in Owner to determine the nodes added. Specifically:

msSiblingOnly
  When present, only sibling nodes are selected for the specified node. When omitted, child nodes are added to the multi-selection.
msVisibleOnly
  When present, only visible nodes are included in the multi-selection. When omitted, all nodes are eligible regardless of their visibility.

ClearWholeSelection indicates whether all existing nodes in the multi-selection are cleared before added new node(s) to the selection list. When set to True, the ClearMultiSelection method is called. Otherwise, the last node in the selection list is removed.

Nodes in the internal selection list are visited to set their MultiSelected property to True. Members used to track the first and last nodes in the multi-selection are updated prior to exit.

Tree node with the child or sibling nodes added to the selection list.
True to remove all existing nodes in the selection list, False to remove the most recent node.
Sorts the top-level nodes using the specified sorting procedure.
WriteDebugReport
- for debugging.
Contains the number of nodes in the container.
Provides indexed access to the TTreeNode instances in the container.
Ordinal position for the TTreeNode instance in the property value.
KeepCollapsedNodes
- if True, preserves the nodes that have been collapsed.
The TCustomTreeView control that is the owner of the container.
Number of tree nodes included in the internal selection list.
The number of tree nodes at the top level of the tree structure.
Provides indexed access to tree nodes at the top level of the tree structure.
Ordinal position for the TTreeNode instance in the property value.
TTreeViewState
- enumerated type containing the permissible values for state of a TTreeView.

TTreeViewState is an enumerated type containing the permissible state values for TCustomTreeView and TTreeView.

Scroll bar visibility or position has been changed in the control.
The maximum width for expanded nodes needs to be recalculated.
The top coordinate for visible, expanded nodes needs to be recalculated.
The maximum level for all nodes needs to be recalculated.
The first visible node on the control has changed.
The last visible node on the control has changed.
The canvas for the control has been changed.
A node has been dragged to a new location in the tree.
The BeginEditing method has been called for the control.
Values in the States property for the control have been changed.
A tree node has been expanded or collapsed using code.
This tree view state is deprecated, and has no functionality after r64855.
The control has called it Paint method.
Node is drawn with a selection rectangle and focus highlighting.

Uses the wrong prefix (tvo instead of tvs). Deprecate and add tvsFocusedPainting. Requires changes in treeview.inc to include both state values until removed.

Node is drawn with a selection rectangle and focus highlighting.
Not used in the current LCL implementation.
A Drag operation and its timer has been started.
A mouse double click event has been handled for the control.
A mouse triple click event has been handled for the control.
A mouse quadruple click event has been handled for the control.
The selected node(s) have been changed in the control.
Set type used to store values from the TTreeViewState enumeration.
TTreeViewStates is a set type used to store zero or more values from the TTreeViewState enumeration. TTreeViewStates is the type used for the States property in TCustomTreeView.
TTreeViewOption
- enumerated type containing the permissible values for Options in TreeViews.

TTreeViewOption - enumerated type containing the permissible values for Options in TreeViews.

Allows selection of several tree-items, e.g. using Ctrl+click and Shift+click. Has the same affect as setting the MultiSelect property to True.
Automatically expands child nodes for a tree-item when user clicks it, or the item is activated by code. Has the same affect as setting the AutoExpand property to True.
Allows painting a horizontal line below a tree-item under cursor when mouse moves. Good for drag-drop.
Detect height of a tree-item based on current font and icons.
If a control looses focus, then don't paint selection for selected tree-item. Same as HideSelection property.
Additionally highlight/underline a tree-item when mouse is over it. Same as HotTrack property.
When some items change, keep previously folded tree-items in folded state.
Don't allow to change item captions by clicking on items with a delay. Same as ReadOnly property.
Right-click also selects a tree-item. Otherwise it only calls PopupMenu. Same as RightClickSelect property.
When a tree-item is selected, paint selection background with full width. Same as RowSelect property.
Show expand/collapse (fold/unfold) icons at left side for nodes with sub-nodes. Same as ShowButtons property.
Show vertical lines at left side which paint tree structure for nested nodes. Same as ShowLines property.
Show the root tree-item which is always present in code but may be hidden for user. Same as ShowRoot property.
Show horizontal lines below all tree-items.
Show tooltip (hint) for a tree-item when the item is too long to fit by width and mouse is over it. Same as ToolTips property.
Prevents toggling the expanded state for the tree view item when it is double clicked.
Tree view item is drawn using settings from theme services.
Indicates if empty space can be be drawn below unselected items in the tree view.
Set type used to store values from the TTreeViewOption enumeration.

TTreeViewOptions is a set type used to store zero (0) or more values from the TTreeViewOption enumeration. Values included in the set indicate that a feature or behavior is enabled for a tree view control.

TTreeViewOptions is the type used for the TCustomTreeView.Options property.

A set of TreeViewOptions which are set be default.

A set of default values used to set the options of a TreeView object when first placed on a form. This set consists of the following items:

- tvoShowRoot
- tvoShowLines
- tvoShowButtons
- tvoHideSelection
- tvoToolTips
- tvoKeepCollapsedNodes
- tvoAutoItemHeight

For the meaning of these options, see the TTreeViewOption documentation.

Default value(s) used for the MultiSelectStyle property in TCustomTreeView.
Default value used as the height for a TTreeNode instance.
Default size used for expand and collapse indicators in TCustomTreeView.

DefaultTreeNodeExpandSignSize contains thew default value used in the TCustomTreeView.ExpandSignSize property. The value may be scaled at run-time in TCustomTreeView if the PPI (Pixels Per Inch) setting in the control differs from the value used at design-time.

Represents symbols types used for expanded or collapsed tree nodes.

TTreeViewExpandSignType is an enumerated type which specifies the symbol displayed in a Treeview to denote the expanded or collapsed state for a given tree node. TTreeViewExpandSignType is the type used to implement the TCustomTreeView.ExpandSignType property.

Uses the mechanism provided by Theme Services.
Uses a Plus or Minus sign.
Uses an unfilled Arrow.
Uses a filled Arrow.
Represents insert mark locations used in TCustomTreeView.

TTreeViewInsertMarkType is an enumerated type with values representing insert mark locations used for nodes in the TCustomTreeView control. TTreeViewInsertMarkType is the type used to implement the InsertMarkType property in TCustomTreeView.

No insert mark is used in a tree view.
Uses an insert mark for the root or first child node in a tree view.
Ancestor class for TTreeView.

TCustomTreeView - ancestor class for TTreeView, which displays a collection of items in a hierarchical tree form. This class defines many properties which are inherited by descendent classes, including loading the data from files or streams, saving to files or streams, updating, sorting alphabetically, editing, making visible or invisible, expanding or collapsing the tree display, and many more.

Please note that Accessibility support in TCustomTreeView might make this control slower if there are a very large number of items, for example: 10,000+ items. If the performance impact is unacceptable, it is possible to turn accessibility off for tree view items by setting the AccessibilityOn property to False. The default value is True.

Implements the OnTimer event handler for the internal Drag/Scroll timer.
TTimer.OnTimer
Timer object for the event notification.
Performs actions needed when the control Canvas has been changed.

Updates the States property to include the value tvsCanvasChanged.

CanvasChanged is not used in the current LCL implementation.
Gets the value for the AutoExpand property.
Value for the property.
Gets the value for the BackgroundColor property.
Value for the property.
Gets the value for the BottomItem property.
Value for the property.
Gets the value for the DropTarget property.
Value for the property.
Member with the OnChange timer for the control.
TEdit used as the editor in the tree view control.
Gets the default dimensions used for new instances of the class.
Size for the new control instance.
Performs actions needed when the specified tree node is added to Items.

Signals the OnAddition event handler (when assigned).

Tree nodes added to the Items for the control.
Implements the OnEditingDone event handler for the Editor in the control.
Object for the event notification.
Implements the OnKeyDown event handler for the Editor in the control.
Object for the event notification.
Virtual key code for the notification.
Shift, Ctrl, or Alt modifier for the key down event.
Prepares the control to edit the text for the specified tree node.

No actions are performed in the method for any of the following conditions:

- ANode has not been assigned (contains Nil).
- ANode is not visible.
- BeginEditing has been called and EndEditing has not yet been called.
- CanEdit (and the OnEditing event handler) returns False.

If a different node is being edited in the control, the EndEditing method is called.

BeginEditing updates the States property to include the value tvsIsEditing.

The TEdit control used as the Editor in the tree view is created (when needed), configured, and aligned to the display rectangle for the tree node. The value in the TTreeNode.Text property is assigned to the Editor, its content is selected, and the Editor is given focus.

Tree node with the text value for the Editor in the control.
True if the specified tree node can be used in the Selected or Selections properties.

Signals the OnChanging event handler (when assigned) to determine if a change is allowed for the specified tree node. Change entails using the tree node as the current Selected node, or including it in Selections when multi-select is enabled in the Options for the control.

The return value is updated in the event handler, and can be set to True to allow a change to the tree node. The return value is always True if the OnChanging event handler has not been assigned.

Use CanEdit to determine if the text for the tree node can edited in the control.

True if the specified tree node can be used in the Selected or Selections properties.
Tree node examined in the method.
Returns True if a given TreeNode can be collapsed.

CanCollapse is a Boolean function used to determine if the tree node in Node can be collapsed. CanCollapse signals the OnCollapsing event handler (when assigned) to determine if the tree node can be collapsed.

The return value is updated in the event handler, and can be set to True when the node has child nodes and is currently expanded. The return value should be set to False if the node does not have any child nodes.

The return value is always True if the OnCollapsing event handler has not been assigned, or when the component is being freed.

True if the specified node can be collapsed.
Tree node examined in the method.
Returns True if the specified tree node can be edited.

CanEdit is a Boolean function used to determine if the tree node in Node can be edited. CanEdit signals the OnEditing event handler (when assigned) to determine if the TTreeNode instance can be modified.

The return value is updated in the event handler, and can be set to True if the tree view control is not configured to be read-only and the tree node is eligible for modification. Use the Options property in the tree view control to check for the read-only setting. The return value is always True if the OnEditing event handler has not been assigned.

True if the specified tree node can modify its property values.
Tree node examined in the method.
True if the specified tree node can be expanded.

CanExpand is a Boolean function used to determine if the tree node specified in Node can be expanded. CanExpand signals the OnExpanding event handler (when assigned) to get the return value for the method.

The return value can be set to True when Node is visible and contains child nodes. The return value is always True if the OnExpanding event handler has not been assigned.

True if the specified node can be expanded.
Tree node examined in the method.
CreateNode
- creates a new node in a TreeView and returns its content.

CreateNode is a TTreeNode function used to create a new tree node for the control. The OnCustomCreateItem event handler is signalled (when assigned) to create the class instance used as the return value. If the event handler has not been assigned, or returns a Nil value, the TTreeNodeClass class reference is used to create the tree node in the return value.

New tree node instance created in the method.
Creates a TTreeNodes container for the control.
TTreeNodes instance created in the method.
CustomDraw
- returns True if Custom Drawing is proceeding in the specified Rectangle.

CustomDraw - returns True if Custom Drawing is proceeding in the specified Rectangle.

Stage indicates whether PrePaint, PostPaint, PreErase or PostErase.

Progress
CustomDrawItem
- returns True if Custom Image drawing is proceeding at the specified TreeNode.

CustomDrawItem - returns True if Custom Image drawing is proceeding at the specified TreeNode.

State denotes one of Selected, Grayed, Disabled, Checked, Focused, Default, Hot, Marked or Indeterminate.

Stage indicates whether PrePaint, PostPaint, PreErase or PostErase.

If PaintImages is True, Images should be painted as well as text.

Implements the storage specifier for the DefaultItemHeight property.
True when tvoAutoItemHeight in not in the Options for the control.
Applies a layout adjustment policy using the specified scaling factors.
TControl.DoAutoAdjustLayout
Layout adjustment policy applied in the method.
Horizontal scaling factor for the layout policy.
Vertical scaling factor for the layout policy.
Implements the storage specifier for the ExpandSignSize property.
True when ExpandSignSize has a value other than the default (-1).
Gets the default size for icons when Images has not been assigned.

The TSize instance contains 0 (zero) in both the Width and Height members.

TSize instance with the Width and Height for an icon.
Gets the image list with the Drag images for the control.

GetDragImages is an overridden TDragImageList function used to get the image list with images displayed during drag and drop operations in the control. GetDragImages re-implements the method to use the TDragImageList member defined in the class instance (when assigned and not empty). Otherwise, Nil is returned from the method.

TControl.GetDragImages
Image list with drag and drop images for the control.
Gets a TSize instance with the dimensions for images in the control.

GetImageSize is a TSize function used to get the dimensions for images displayed in the tree view control. The return value has Width and Height members with the image dimensions.

When an image list has been assigned to the Images property, its SizeForPPI method is used to scale the value in ImagesWidth to the current display density in Font. When Images has not been assigned, the GetBuiltinIconSize method is called to get the return value.

TControl.Font
TSize instance with the dimensions for images in the control.
GetMaxLvl
- returns the maximum level of branching of the tree structure.
GetMaxScrollLeft
- returns maximal extent of scrolling to the left.
GetMaxScrollTop
- returns the maximal extent of scrolling upwards.
GetNodeAtY
- returns the node at the specified vertical coordinate.
Gets the height for the usable drawing area in the control.
Gets the width for the usable drawing area in the control.
Implements the storage specifier for the Indent property.
True when Indent has a value other than the default (-1).
IsCustomDrawn
- returns True if the specified target is custom drawn.
True when event handlers have been assigned for the specified target and stage.
Drawing target examined in the method.
Drawing stage examined in the method.
Returns True if the specified tree node and its parent nodes are visible and expanded.
True if the specified tree node and its parent nodes are visible and expanded.
Tree node examined in the method.
IsNodeHeightFullVisible
- returns True if the full height of the specified node is visible in the current view.
IsInsertMarkVisible
- returns True if an Insert mark is visible.
Makes the specified node selected in the tree view control.

MoveSelection is a method used to make the tree node in ANewNode a selected node in the tree view control. The actions performed depend on the multi-selection setting for the control. When tvoAllowMultiSelect has been included in the Options property, the node is included in Selections when ASelect is True.

If multi-selection has not been enabled for the control, the value in ANewNode is assigned to the Selected property.

The MakeVisible method in the TTreeNode instance is called to make the node visible, and the scroll bars for the control are updated.

Used in the implementation of the KeyDown method. Used to implement methods like MoveHome, MoveEnd, MovePageDown, MovePageUp, MoveToNextNode, and MoveToPrevNode.

Tree node to select in the control.
True to include the tree node in Selections (when enabled), False to select only the specified node.
Performs actions needed when the selection in the control has been changed to include the specified tree node.

Change is a method used to perform actions needed when the selection in the control has been changed. Node contains the tree node that was used in the control selection. Change signals the OnChange event handler (when assigned).

Change is called from the event handler used for the internal timer activated when a new selection is made and the control synchronizes the tree nodes to the visual display.

Use the OnSelectionChange event handler for the notification that occurs before the node is included in the control selection.

Tree node included in the selection for the control.
Performs actions needed when the specified tree node is collapsed.

Collapse is a method used to perform actions needed when the tree node in Node is collapsed. Collapse updates the visibility and position for the scroll bars in the control. The OnCollapsed event handler is signalled (when assigned) for the tree node in Node.

No actions are performed in the method when the component is being freed.

Collapse is called when the Collapse method in the TTreeNode instance is called.

See Expand for the actions performed when a tree node is expanded.

Tree node collapsed in the control.
Performs actions needed when the handle for the control is (re-)created.

CreateWnd is an overridden method in TCustomTreeView used to perform actions needed when the handle for the control is created or re-created. CreateWnd ensures that the States property is updated to remove the value tvsStateChanging. The internal flags for scroll bar visibility are reset, and the inherited method is called.

Performs actions needed when mouse is clicked on a tree node in the control.

Click is an overridden method in TCustomTreeView. It calls the inherited method when a tree node has been selected using a mouse down event. No actions are performed in the method when a tree node has not been selected using the mouse.

TControl.Click
Performs actions needed when the Left mouse button is double clicked on a selected tree node.

DblClick is an overridden method in TCustomTreeView. It calls the inherited method when a tree node has been double clicked using the mouse. No actions are performed in the method when a tree node has not been selected and a double click event occurs.

TControl.DblClick
TControl.TripleClick
TControl.QuadClick
Performs actions needed when the specified tree node is deleted.

Delete is a method used to perform actions needed when the specified tree node is deleted from the list of tree nodes in Items. Delete signals the OnDeletion event handler (when assigned) for the tree node specified in Node. No actions are performed in the method if OnDeletion has not been assigned.

Delete is called when a TTreeNode instance is freed, or when the Delete method in TTreeNodes is executed.

Tree node deleted from the Items in the control.
Performs actions needed when the handle for the control is destroyed.

Includes the tvsStateChanging flag in the States property, and calls the inherited method. Ensures that the Canvas handle has been freed after calling the inherited method. Resets size values in the ScrollInfo for the horizontal and vertical scroll bars.

Signals the OnCreateNodeClass event handler (when assigned).
Signals the OnCreateNodeClass event handler (when assigned).
Class reference used to create the new node instance.

Ensures that the previous drop target is reset, and that the drag scroll timer is disabled. Restores the Tooltips to their previous values.

Performs actions to handle a horizontal mouse wheel message.

DoMouseWheelHorz is an overridden method used to perform actions needed to handle a horizontal mouse wheel message. It calls the inherited method to signal the OnMouseWheelHorz event handler (when assigned), or other chtOnMouseWheelHorz handlers registered in the application. If the message is not handled in the ancestor, the value in ScrolledLeft is updated to apply the delta value in WheelDelta. The position for a tool tip (or hint) is also updated using the coordinates in Mouse.

TControl.DoMouseWheelHorz
Implements the Paint method for the control.

DoPaint is a method used render the control to its canvas. It Implements the overridden Paint method. No actions are performed in the method when tvsPainting has been included in the States property (Paint has already been called).

DoPaint includes the value tvsPainting in the States property to indicate that the paint method is active. It includes the value tvoFocusedPainting in States when Focused is True, or excludes the value when Focused is False.

The UpdateDefaultItemHeight is called when tvoAutoItemHeight is included in the Options for the control. The existing value in DefaultItemHeight is used when the Option is omitted.

DoPaint performs the multi-stage drawing process for nodes in the tree view control using its Canvas and a display rectangle using the ClientWidth for the control. If the control includes event handlers for the cdPrePaint stage, the CustomDraw method is called.

DoPaint draws the nodes on the tree view starting at the node in TopItem. If the node is Visible, the DoPaintNode method is called to render the tree node. The next visible node in the tree is retrieved, and the process is repeated until no more nodes are available or the drawing area is filled.

An InsertMark is drawn for the root node if needed.

Borders are drawn around the control using the value in BorderWidth.

If the control has event handlers for the cdPostPaint stage, the CustomDraw method is called.

The value tvsPainting is excluded from the States property prior to exit.

Renders the specified tree node to the canvas for the control.

DoPaintNode is a method used to render the tree node specified in Node to the Canvas for the control. DoPaintNode is called from the DoPaint method, and occurs for visible nodes processed in the method. No actions are performed in the method when the Node is not in the visible client area for the control.

DoPaintNode draws the elements which represent a given tree node, including:

- Text for the tree node.
- An Image or State Image for the node.
- Expand or Collapse indicators for the node.
- Background for the node using theme services or node state.
- An Insert mark for the initial child node in the tree hierarchy.
- Horizontal and vertical lines used to join nodes in the tree hierarchy.
- The Separator line drawn after a node.

DoPaintNode retrieves scaled image resolutions needed for the Images and StateImages in the control. The images sizes are determined by applying the scaling factor in Canvas to the current Pixels Per Inch setting in Font.

Use of multi-stage custom drawing is supported. If event handlers are provided for the cdPrePaint and cdPostPaint stages, the CustomDraw and CustomDrawItem methods are used to render the node with the drawing state for the node.

Tree node rendered in the method.
Defines a method used to draw a built-in icon for a specified tree node.

DrawBuiltInIcon is a virtual method which is used to draw the a built-in icon for the specified tree node. A built-in icon is provided by the operating system or platform when an image list has not been provided or populated in the Images property.

The return value contains a TSize instance with the dimensions for the built-in image. In TCustomTreeView, the method returns an empty TSize instance (CX and CY are both set to 0). The method must be overridden in a descendent class (like TShellTreeView) to use the icon(s) appropriate for the implementation.

TSize instance with the dimensions for the built-in image.
Tree node used to select an appropriate icon image.
Rectangle where the icon image was drawn.
Updates the specified tree node and hides editor.

No actions are performed in the method if tvsIsEditing has not been included in the States property (BeginEditing was not called).

EndEditing removes the value tvsIsEditing from the States property to indicate that editing has been completed for the control.

The OnEdited event handler is signalled (when assigned) to validate or modify the new text value, and the text is stored in Node.

EndEditing calls the Invalidate method to force the control to be redrawn.

Ensures parent nodes are expanded, and the specified node is visible in the control.

No actions are performed in the method if ANode has not been assigned (contains Nil).

Calls the ExpandParents method in ANode to expand any parent nodes not already expanded. Ensures that the tree node in ANode is visible in the client area for the control.

EnsureNodeIsVisible is used in the TTreeNode.MakeVisible method, and called from BeginEditing when the editor is displayed for the control.

Expands the specified tree node and updates the scroll bars for the control.

Expand is a method used to expand the tree node specified in Node on the tree view control. Expand is called after when the TTreeNode instance in Node has updated its States property and notified the Items container of the change.

Expand updates the scroll bars for the control. The OnExpanded event handler is signalled (when assigned) to performs actions needed after the tree node has been expanded.

Tree node expanded in the method.
Gets the index of the image for the specified node.

Allows the image index for the tree node to be updated before the node is drawn. Signals the OnGetImageIndex event handler (when assigned) where the image index can be determined and stored in the specified tree node.

Called from the DoPaintNode method for any unselected nodes in the tree view. Use the OnGetSelectedIndex event handler to get the image index for a selected node.

Tree node examined in the method (and possibly updated in the event handler).
Gets the index for the image used a selected node in the control.

Allows the image index for a selected node to be updated before the node is drawn. Signals the OnGetSelectedIndex event handler (when assigned) where the image index can be determined and stored in the specified tree node.

Called from the DoPaintNode method for any a selected node in the tree view. Use the OnGetImageIndex event handler to get the image index for a node that is not selected.

Tree node examine in the method (and possibly updated in the event handler).
Handles key down events for the control.

KeyDown is an overridden method in TCustomTreeView which handles key down events for the control.

Key contains the virtual key code examined in the method.

Shift is the Shift, Alt, Ctrl modifier for the key code.

KeyDown calls the inherited method on entry. KeyDown ensures that the following Key codes are handled in the method:

VK_DOWN
  Moves to the next node in the tree. Shift+Down includes the next node in the Selections property.
VK_UP
  Moves to the previous node in the tree. Shift+Up includes the next node in the Selections property.
VK_HOME
  Moves to the tree node at the top of the visible area. Shift+Home includes an affected range of nodes in the Selections property.
VK_END
  Moves to the tree node at the bottom of the visible area. Shift+End includes an affected range of nodes in the Selections property.
VK_PRIOR (PageUp)
  Moves the first node on the previous page for the control. Shift+PageUp includes an affected range of nodes in the Selections property.
VK_NEXT (PageDn)
  Moves the first node on the next page for the control. Shift+PageDn includes an affected range of nodes in the Selections property.
VK_LEFT
  Collapses the current node (when expanded) and moves to the parent node.
VK_RIGHT
  Expands the current node (when needed), or moves to the next expanded node in the tree.
VK_ADD (Plus)
  Expands the current node.
VK_SUBTRACT (Minus)
  Collapses the current node.
VK_F2
  Calls BeginEditing for the Selected node if the control is not ReadOnly.

If the key event is handled in the method, Key is set to VK_UNKNOWN.

Calls MoveSelection if the key event changes the Selected tree node (or Selections) in the control.

TWinControl.KeyDown
Virtual key code examined in the method.
Shift, Ctrl, Alt modifier for the key code.
Handles mouse down events for the tree view control.

MouseDown is an overridden method in TCustomTreeView used to handle mouse down events in the control.

Button identifies the mouse button for the event.

Shift contains the Shift, Alt, or Ctrl modifier for the mouse event.

X and Y contain the coordinates for the mouse event.

MouseDown updates the States property to remove the values tvsEditOnMouseUp and tvsSingleSelectOnMouseUp.

The tree node for the mouse event is retrieved using GetNodeAt for the mouse coordinates. The Selected state for the tree node is saved so the selection can be restored prior to exit.

MouseDown ensures that both Left and Right mouse button events are handled (when needed). When RightClickSelect is True, the Selection can be changed using the Right mouse button. Otherwise, it is ignored. Multi-selection is handled when the Shift modifier is set for the mouse event.

A mouse event on an unused space in the control causes ClearSelection to be called when RowSelect is True. Selected is set to Nil if RowSelect is False.

When MultiSelect has not been enabled, the selected tree node is assigned to the Selected property. When it has been enabled, the MultiSelect method in Items is used to include the selected tree node in the Selections property. ClearSelection is called if the tree node was de-selected by the mouse event. Selected is set to Nil if the tree node was de-selected by the mouse event.

The control is Focused (when needed and allowed) by calling the SetFocus method.

Mouse events in the Expand or Collapse indicator causes the Expanded state for the tree node to be toggled. When RowSelect is enabled, the MouseUp event causes the editor to be activated for the node.

MouseDown calls the inherited method to handle drag messages or close the editor for the control.

TControl.MouseDown
Mouse button for the event.
Shift, Ctrl, or Alt modifier for the mouse event.
Horizontal coordinate for the mouse event.
Vertical coordinate for the mouse event.
Handles mouse move messages for the control.

MouseMove is an overridden method in TCustomTreeView used to handle mouse move messages for the control. It calls the inherited method on entry to notify the drag manager when the control is dragged, and signals the OnMouseMove event handler (when assigned).

MouseMove ensures that an automatic insertion mark is generated when needed. It also updates the tool tip (or Hint) location and updates the hot tracking position.

TControl.MouseMove
Shift, Ctrl, or Alt modifier for the mouse message.
Horizontal coordinate for the mouse pointer.
Vertical coordinate for the mouse pointer.
Handles mouse up events for the control.
TControl.MouseUp
Performs actions needed when the mouse cursor leaves the control.
Performs actions when a property value in the specified tree node has been changed.
Tree node with the changed property value.
Indicates the value changed in the tree node.
Determines if the specified tree node has child nodes.

NodeHasChildren is a Boolean function used to determine if the tree node specified in Node has child nodes. NodeHasChildren signals the OnHasChildren event handler (when assigned) to determine the return value for the method. The return value is False if OnHasChildren has not been assigned.

NodeHasChildren is called when a tree node reads the value for its HasChildren property. The TTreeNode instance uses an existing value in its States flags when available. If not set, NodeHasChildren is used to determine if the flag value (nsHasChildren) is included in or excluded from the States property in the tree node.

True if the node has child nodes. False if OnHasChildren has not been assigned.
Tree node examined in the method.
Handles the notification when a component is added to or removed from the class instance.

Notification is an overridden method in TCustomTreeView, and calls the inherited method on entry. It ensures that the member for Images or StateImages is set to Nil when the component is removed from the class instance.

TControl.Notification
Component for the notification event.
Operation performed for the component.
Renders the tree view control.

Calls DoPaint to render the tree nodes, scroll bars, and decorations for the control.

TCustomControl.Paint
Scrolls the visible area in the control by the specified horizontal and vertical offsets.
Horizontal offset applied to the visible area for the control.
Vertical offset applied to the visible area for the control.
Sets the value for the DragMode property.
TControl.SetDragMode
New value for the DragMode property.
Sets the value for the Options property.
New value for the property.
Calculates and updates the value in the DefaultItemHeight property.

UpdateDefaultItemHeight is a procedure used to calculate and update the value for the DefaultItemHeight property. No actions are performed in the method for the following conditions:

- tvoAutoItemHeight has not been included in the Options for the control.
- The handle for the control has not been allocated.
- The handle for the control Canvas has not been allocated.

The height for the Text in the node is calculated using the TCanvas.TextHeight method, and space is reserved for the default spacing for the tree node.

GetImageSize is called to get the height needed for Images or StateImages used in the control. Values in ImageSize and StateImageSize are updated with the scaled image heights including default spacing. The calculated value is enlarged for the Image sizes if needed.

UpdateDefaultItemHeight updates the States property to include values that indicate the item height for nodes has changed. The Invalidate method is called to force the control to be redrawn.

UpdateDefaultItemHeight is called from methods like: InitializeWnd, Loaded, SetOptions, and DoPaint.

Sets or removes an insertion mark at the specified position based on the values in Options.

An insertion mark is removed if tvoAutoInsertMark has not been included in the Options for the control, and at design-time. Calls SetInsertMark to create and display the insertion mark.

Horizontal coordinate for the insertion mark.
Vertical coordinate for the insertion mark.
Performs actions needed when the selection for the tree view has been changed.

DoSelectionChanged is called when a value in the Selection or MultiSelected property is changed. It signals the OnSelectionChange event handler (when assigned).

DoSelectionChanged is called after the flags in States has been updated to include tvsSelectionChanged, and before the change timer is enabled for the control.

Handles the LM_HSCROLL message for the control.

WMHScroll ensures that the ScrollLeft property is updated to apply the horizontal scroll code passed in the Msg argument. The following scroll codes are handled in the method:

SB_LEFT
  Sets ScrolledLeft to 0.
SB_RIGHT
  Sets ScrolledLeft to its largest value for the visible control area.
SB_LINERIGHT
  Increments ScrolledLeft by one-half of the default ItemHeight for the control. (?)
SB_LINELEFT
  Decrements ScrolledLeft by one-half of the default ItemHeight for the control. (?)
SB_PAGERIGHT
  Increments ScrolledLeft by one page of lines. (?)
SB_PAGELEFT
  Decrements ScrolleLeft by one page of lines. (?)
SB_THUMBPOSITION, SB_THUMBTRACK
  Sets ScrolledLeft to the current scroll bar position in Msg.
SB_ENDSCROLL
  Ends scroll bar message handling.

(?) Using client / item height instead of client / item width. Is that correct?

Window message handled in the method.
Handles the LM_VSCROLL message for the control.
Window message handled in the method.
Handles the LM_LBUTTONDOWN message for the control.

WMLButtonDown ensures that the States property is updated to include tvsDragged for the Left mouse button message. It calls the inherited method prior to exit to update MouseCapture and Click events for the control.

TControl.WMLButtonDown
Window message examined in the method.
Handles the LM_SETFOCUS message for the control.

Calls the Invalidate method to force the control to be redrawn. Calls the inherited method prior to exit.

TWinControl.WMSetFocus
Window message handled in the method.
Handles the WMKillFocus message for the control.
Control message handled in the method.
Resizes the control and updates the scroll bars and the States property.

Resize is an overridden method in TCustomTreeView. It updates values in the States property to include tvsScrollbarChanged and tvsBottomItemNeedsUpdate. It calls the inherited method to check for changes and execute the DoOnResize method. Resize calls UpdateScrollbars to update the visibility and position for the scroll bars on the control.

TControl.Resize
Contains the tree node being edited in the control.

EditingItem is a read-only TTreeNode property which contains the tree node currently being edited in the control. Its value is assigned when the BeginEditing method is called, and unassigned when the EndEditing method is called.

Contains the state values in effect for the control.

States is a read-only TTreeViewStates property which contains the state values in effect for the control. Value from the TTreeViewState enumeration are included in the set type to indicate that the corresponding state is "ON", "TRUE", or "ACTIVE". See TTreeViewState for more information about the enumeration values and their meanings.

Returns the currently selected child accessible object.

In TCustomTreeView, the value in Selection is included as a data object for the accessibility object.

True if the node data was successfully added to the accessibility object.
Turns accessibility on or off to speed up the control.

This property is provided for the situation where a tree view contains a huge number of items, lets say 10,000+. In this case accessibility might slow the tree down, so turning this property off might make things faster.

Unfold a tree-item when user clicks it or an item activated by code.

AutoExpand is a Boolean property which indicates if a tree node is automatically expanded when it is Selected using a mouse click or keyboard navigation. The default value for the property is False.

The property value is True when the value tvoAutoExpand has been included in the Options property. Changing the value in the property causes the Options property to be updated. When set to True, the value tvoAutoExpand is included in the Options property. Otherwise, the value is excluded from Options.

AutoExpand is used when the TTreeNodes container in the Items property adds or moves a tree node. If the new tree node or its owner has AutoExpand set to True, the value is also applied to its Parent node.

Line style used to draw the border for the control.

The default value for the property is bsSingle in TCustomTreeView.

TWinControl.BorderStyle
Indicates if the current Selection is hidden when the control loses focus.

HideSelection is a Boolean property which indicates if the current selection is hidden when the control loses focus. The default value for the property is True.

The value for the property is True if tvoHideSelection has been included in the Options for the control. Changing the value in the property causes tvoHideSelection to be included in or excluded from Options. The control is redrawn if Selected has an assigned tree node when the property is changed.

Additionally highlight/underline tree-item when mouse is over it.
TCustomListView.HotTrack
Font color used for the text in a tree node when hot tracking is enabled.
Font color used for tree nodes when the tree view is not enabled.

The default value for the property is clGrayText.

Size in pixels by which each nested branching level is to be indented.

Use 0 for auto-sized value.

Enables or disables selection of several tree-items at one time.

MultiSelect is a Boolean property used to enable or disable selection of multiple nodes in the tree view control. The default value for the property is False, and allows a single selected node indicated in the Selection property.

When set to True, multiple nodes can be selected and stored in the Selections property. Use Ctrl+Click add or remove a node in the Selections property. Use Shift+Click to add or remove a range of nodes in the Selections property.

Changing the value for the property causes existing nodes in both Selection and Selections to be cleared.

Use MultiSelectStyle to set the multi-selection style enabled for the control.

Use the Select method to add a node to the values in Selections.

Use SelectionCount to get the number of nodes in Selections.

Use GetFirstMultiSelected or GetLastMultiSelected to get the tree node for the corresponding node in Selections.

Use ClearMultiSelection to remove all existing nodes in Selections.

Event handler signalled when a tree node is added to the tree node Items in the control.

OnAddition is a TTVExpandedEvent property with the event handler signalled when a tree node is added to the Items for the control. The Sender argument contains the TCustomTreeViwe instance for the notification. The Node argument contains the TTreeNode instance added to the control.

OnAddition is not used in the current LCL implementation.
OnAdvancedCustomDraw
- event handler for advanced custom drawing.
OnAdvancedCustomDrawItem
- event handler for advanced custom drawing item.
OnChange
- specialized event handler for a change in the TreeView.
OnChanging
- specialized event handler while TreeView is being changed.
OnCollapsed
- specialized event handler when part of the tree is collapsed.
OnCollapsing
- specialized event handler while part of the tree is being collapsed.
OnCompare
- specialized event handler for comparisons within the TreeView.
Event handler signalled to get the class reference used to create new tree nodes.
OnCustomCreateItem
- event handler for custom item creation.
OnCustomDraw
- event handler for custom drawing.
OnCustomDrawItem
- event handler for custom drawing item.
Event handler signalled to custom draw expand or collapse indicators.
Event handler signalled when a node is deleted from the node tree.
OnEdited
- specialized event handler when the TreeView has been edited.
OnEditing
- specialized event handler while a TreeView is being edited.
Event handler signalled when EndEditing is called for the control.
OnExpanded
- specialized event handler when a TreeView has been expanded.
OnExpanding
- specialized event handler while a TreeView is being expanded.
OnGetImageIndex
- event handler for finding the index of an image.
OnGetSelectedIndex
- event handler for finding index of selected item.
Event handler signalled to determine if a given node in the tree view has child nodes.
Event handler signalled when the text for a tree node has been changed.

OnNodeChanged is a TTVNodeChangedEvent property with the event handler signalled when the text in a tree node has been changed. OnNodeChanged is signalled from the NodeChanged method, and allows actions to be performed when the Node is updated.

NodeChanged and OnNodeChanged are called from the TTreeNode.Changed method, and occurs after the value in the Text property for the TTreeNode instance has been updated.

Event handler signalled when the selection in the tree view control is changed.

OnSelectionChanged is a TNotifyEvent property with the event handler signalled when the selection for the control has been changed. OnSelectionChanged is signalled (when assigned) from the DoSelectionChanged method, and occurs after the value in Selection has been updated. It also occurs when the value in MultiSelected is changed.

Indicates whether the text (or caption) for tree nodes can be edited in the control.

ReadOnly is a Boolean property which indicates whether the text for the TTreeNode instances in Items can be edited in the control. When ReadOnly is set to False, the BeginEditing method is not called when the F2 key is pressed, or when the Left mouse button is double clicked. The default value for the property is False.

The property value is True when tvoReadOnly has been included in the Options for the control. Setting a new value for the property causes tvoReadOnly to be included in or excluded from the values in Options. Changing the value to False causes the EndEditing method to be called.

Right-click also selects tree-item. Else it only calls PopupMenu.
When a tree-item is selected, paint selection background with full width.
Horizontal coordinate for the origin of the visible display area.

ScrolledLeft is an Integer Property with the horizontal coordinate for the origin of the visible display area in the tree view control.

Use ScrolledTop for the vertical coordinate for the origin of the visible display area.

Vertical coordinate for the origin of the visible display area.

ScrolledTop is an Integer Property with the vertical coordinate for the origin of the visible display area in the tree view control.

Use ScrolledLeft for the horizontal coordinate for the origin of the visible display area.

Enables an expand/collapse (fold/unfold) icon for nodes with child nodes.
Enables the horizontal and vertical lines which join nodes in the tree hierarchy.
Enables drawing of the root node indicator for the tree view control.
Indicates if horizontal separators are drawn between nodes in the tree view control.
Allow to show items sorted: by caption, by Data property or both.
Changing the Text or Data of a node will sort again. While adding nodes does not. Call TreeView1.AlphaSort to sort the whole tree. Call ParentNode.CustomSort(nil) to sort only the child nodes of a single node.
Show tooltip (hint) for a tree-item when the item is too long to fit by width and mouse is over it.
Create
- constructor for TCustomTreeView: calls inherited Create then sets defaults for style, size, etc.

Create - constructor for TCustomTreeView: calls inherited Create then sets defaults for style, size, etc.

Among the variables initialized and defaults set are:

size, color, the symbols for expansion etc, the border style and width, scroll bars, options, indentation, timers, action links

TCustomControl.Create TComponent.Create
Destroy
- destructor for TCustomTreeView: frees images, nodes and links, then calls inherited Destroy.
TCustomControl.Destroy TComponent.Destroy
Sorts tree nodes using default sort procedure (alphabetic).
Always returns False (because CustomSort returns False).
Clears the selection in the tree view control.

ClearSelection is a method used to clear tree nodes selected in the tree view control. ClearSelection uses the value in MultiSelect to determine the actions needed to clear the selected nodes.

If MultiSelect has been enabled in the Options for the control, the ClearMultiSelection method is called to clear the selected nodes.

KeepPrimary indicates whether the first tree node in a multi-selection is retained. When set to False, all selected nodes are removed from the Selections property. Otherwise, the tree node in Selected is retained.

If MultiSelect has not been enabled, the value in the Selected property is set to Nil to clear the single node selection.

No actions are performed in the method when MultiSelect is False and KeepPrimary is True.

ClearSelections is called from methods that handle mouse or keyboard selection, like KeyDown and MouseDown. It is also called when a new value is assigned to the MultiSelect property.

True if the first node in a multi-selection is kept.
Verifies that values are updated and valid for the tree view control.

ConsistencyCheck is a method used to validate and/or update property and member values in the control. It raises an Exception (catchable in the debugger) for invalid property values in the control, including:

Canvas
  Raises the exception if Canvas is not assigned.
DefaultItemHeight
  Raises the exception if DefaultItemHeight has a negative value.
FIndent member
  Raises the exception if FIndent has a negative value.
FMaxRight member
  Raises the exception if FMaxRight has a negative value.
IsEditing / Selected
  Raises the exception if IsEditing is True and Selected is unassigned.
Selected
  Raises the exception if the node in Selected is not visible.
Items
  Raises the exception if Items has not been assigned.

The Items property has additional validations performed for its property values. The ConsistencyCheck method in Items is called to verify node counts, update counts, index values, and hierarchy levels in the container. An Exception is raised for error conditions in these items as well.

Values in the States property are examined and updated (when needed) to refresh the display coordinates for tree nodes, the maximum width for the expanded nodes in the control, and the levels in the tree hierarchy. These operations may also raise an Exception for invalid states or values.

ConsistencyCheck is called from the WriteDebugReport method.

If True, the external method specified in SortProc is used for sorting.

CustomSort is a Boolean function used to sort the tree nodes in Items using the sort procedure specified in SortProc. If SortProc is not assigned, the DefaultTreeViewSort method is used in the sort procedure.

No actions are performed in the method when the number of tree nodes in Items is 0 (zero).

The return value is always False.

CustomSort calls BeginUpdate to minimize updates during the sorting process. EndUpdates is called when the sorting process is completed.

Top-level nodes in Items are sorted by calling the SortTopLevelNodes in items. Child nodes are then sorted (when present), starting at the first top-level node in the tree. The ClearCache method in Items is called to invalidate the node cache for the control.

The States property is updated to force the node coordinates and scroll bars to be refreshed in the control.

Always returns False.
Routine used to implement the sort procedure in the method.
DefaultTreeViewSort
- returns result of string comparison between names of Node1 and Node2

DefaultTreeViewSort - returns result of string comparison between names of Node1 and Node2.

DefaultTreeViewSort compares the text of two TreeNodes and returns the following result:

< 0
  if Node1.Text<Node2.Text.
0
  if Node1.Text=Node2.Text.
> 0
  if Node1.Text>Node2.Text.

The comparison takes into account ANSI characters, i.e. it takes care of accented characters. Unlike AnsiCompareText, the comparison is case sensitive.

Has an empty implementation in the current LCL version.
TWinControl.EraseBackground
GetHitTestInfoAt
- returns the result of a hit test at the point (X, Y).
Searches all expanded nodes for the tree node at the specified position.
Visible tree node at the specified position, or Nil when not found.
Horizontal coordinate for the the node or row.
Vertical coordinate for the tree node or row.
Gets the tree node at the specified vertical coordinate with a visible expand symbol.
GetInsertMarkAt
- find if there is an insert mark at the specified coordinates.
SetInsertMark
- place an Insert mark at the specified node in the tree.
SetInsertMarkAt
- place an insert mark at the specified coordinates.
Causes the control to be redrawn when a redraw is not already in progress.

Invalidate is an overridden method in TCustomTreeView, and causes the control to be redrawn if it is not already re-painting. Invalidate checks the States property for the tvsPainting flag. When present, the Paint method has already been called but not yet completed.

No actions are performed in the method when a paint operation is in progress.

Invalidate calls the inherited method prior to exit.

TControl.Invalidate
Indicates if the control is currently editing a node in the tree.

IsEditing is a Boolean function used to determine whether the control is currently editing a node in the tree view. IsEditing checks the values in the State property for the tvsIsEditing flag value. The return value is True when tvsIsEditing is present in the States property.

When present, the BeginEditing method has been called and the EndEditing method has not yet been called.

True if the tvsIsEditing flag is present in States.
Starts an update process for the tree view control.

BeginUpdate is a method used to start an update process for the tree view control. BeginUpdate is used with EndUpdate to maintain update counters used to consolidate updates and event notifications in the control.

Finishes an update process for the tree view control.

EndUpdate is a method used to finish an update process for the tree view control. EndUpdate is used with BeginUpdate to maintain update counters used to consolidate updates and event notifications in the control.

EndUpdates raises an Exception (catchable in the debugger) if the internal update counter is 0 or less when the method is called.

EndUpdates calls the EndUpdate method in the Items container. UpdateScrollBars is called to refresh the position in the visible scroll bars when a change actually occurred in the list of tree nodes.

Raises an Exception if the internal update counter is 0 or less when the method is called.
Collapses all nodes in the tree view and displays only the root for the tree.

Visits all top-level tree nodes in the Items property and calls their Collapse method.

Expands all nodes in the tree view.

Visits all top-level tree nodes in Items and calls their Expand method.

Load tree view data from the specified file.
Loads tree view data from the specified stream.
Saves the tree view data to the specified file.
Saves the tree view data to the specified stream.
WriteDebugReport
- used for debugging.
LockSelectionChangeEvent
- if the selection has changed, lock its status.
UnlockSelectionChangeEvent
- unlock a selection to allow it to be changed.
GetFirstMultiSelected
- returns the first node from a multiple selection.
This works only if tvoAllowMultiSelect is enabled.
Gets the last tree node added to a multi-selection in the Items for the controls.
Last tree node in a multi-selection.
Makes the specified node(s) become selected in the control.

Select is an overloaded method used to make a node, array of nodes, or list of nodes become selected in the tree view control.

Tree node assigned to Selected in the method.
Shift state for the selection; Shift assumes multi-selection is enabled.
Array or TList with TTreeNode instances to add to the Selections in the control; assumes multi-select is enabled.
SelectionVisible
- returns True if a selection is visible.
MakeSelectionVisible
- method for making a selection visible.
Clears selected tree node(s) in the control if they are not visible.

If MultiSelect has been enabled in the Options for the control, the ClearMultiSelection method in Items is called to clear the values in the Selections property. Otherwise the Selected property for the TTreeNode instance in Selected is set to False (which makes the Selected property unassigned).

No action are performed if MultiSelect has not been enabled and Selected has not been assigned.

Creates and fills a TStringList with the text for the selected nodes in the control.
TStringList instance with the selected nodes in the control.
Selects the first node with text matching a value in the specified list.
TStringList with the text for nodes selected in the method.
True if the TStringList instance is freed in the method.
Moves the selection to the next tree node following the last selection in the control.
True if the next node becomes selected in the control.
Moves the selection to the visible tree node following prior to the last selection in the control.
True if the previous node becomes selected in the control.
Moves the selection to the next display page for the control.
True if the node becomes selected in the control.
Moves the selection to the previous display page for the control.
True if the node becomes selected in the control.
Moves to and optionally selects the first visible node in the control.
True if the node is selected in the control.
Moves to and optionally selects the last expanded child node in Items.
True if the node is selected in the control.
Color of background area of control.

Contains the same value as the Color property.

Width of the line drawn as a border around the control.

The default value for the property is 0 in TCustomTreeView.

TWinControl.BorderWidth
Last visible tree node starting at the TopItem in the control.
Color used for the background in the control display area.

The default value for the property is clWindow. Contains the same value as the BackgroundColor property.

TControl.Color
Default height for tree nodes in the control.

DefaultItemHeight is an Integer property with the default height for tree nodes displayed in the control. The default value for the property is defined in the DefaultTreeNodeHeight constant, and assigned in the constructor for the class instance.

When tvoAutoItemHeight has been included in the Options for the control, the property value is determined using the Font and the images for the control. A new value assigned to the property is ignored when automatic item height has been enabled.

The value may be changed when a layout adjustment policy is applied in DoAutoAdjustLayout, or when the UpdateDefaultItemHeight method is called. It is also updated (if needed) when values are assigned to the Images or StateImages properties.

Setting a new value for the property causes the control to be redrawn.

DefaultItemHeight is the value used in the TTreeNode.Height property for tree nodes added to the Items container.

TControl.Font
DropTarget
- the target node for dropping a dragged item.
Color used to paint expand/collapse (fold/unfold) symbol (i.e. plus/minus symbol).
Size of expand/collapse (fold/unfold) symbol.

Use 0 for the auto-sized value.

Sets the shape for the expand/collapse (fold/unfold) symbols.
Image list which holds icons for the tree nodes in Items.
Width for the Images used in the tree view control.

ImagesWidth is an Integer property which contains the width for the Images assigned in the control. ImagesWidth provides the value that is scaled to the Pixels Per Inch setting in the Font property when Images have been assigned for the control.

The default value for the property is 0 (zero), and indicates that an explicit image width has not been assigned.

Setting a new value for the property causes the control to the redrawn.

ImagesWidth is used in the DoPaintNode method to retrieve the scaled image resolution for the bitmaps in Images.

Use StateImagesWidth to set the width for the bitmaps in the StateImages property.

InsertMarkNode
- place a marker on the specified node.
InsertMarkType
- the type of marker to be inserted.
The container with the TTreeNode instances used in the control.

Items is a TTreeNodes property with the container used to access and maintain the hierarchical list of TTreeNode instances displayed in the tree view control.

Items allows indexed access to the TTreeNode instances in the container by their ordinal position.

// the following are equivalent AText := ATreeView.Items[0].Text; // caption for the first tree node AText := ATreeView.Items.Item[0].Text; // caption for the first tree node

Methods in Items can be used to access and maintain the tree nodes and their hierarchy, including:

- Add
- AddChild
- AddFirst
- Clear
- Delete
- Insert

See TTreeNodes for more information about the properties and methods in the container class.

KeepCollapsedNodes
- if True, the collapsed nodes are to be retained.
Additional options for the MultiSelect property.
The set of options enabled in the tree view control.

Options is a TTreeViewOptions property with the set of options enabled for the tree view control. TTreeViewOption contains the enumeration values allowed in the set type, and cause features and behaviors to be enabled when included in the set type.

The default value for the property is defined in the DefaultTreeViewOptions constant. Assigning a new set of values to the property may cause other property values and/or the control state to be changed, and the control may be redrawn.

Specifies the scroll bars displayed for the tree view control.
The selected tree node in the control.

Selected is a TTreeNode property which contains the selected tree node in the control. A tree node is selected when the Left or Right mouse button is clicked on the code. It can also be selected by assigning a TTreeNode instance to the property.

When a tree node is selected or unselected, the Selected property in the TTreeNode instance is updated. Use the OnChanging event handler to determine if a specific tree node can become the selected node in the control. Use the OnChange event handler to perform actions needed after the tree node is made the Selected node in the control.

Selecting a tree node forces it to become fully visible in the control. This includes expanding parent nodes to ensure that the node is visible. The OnExpanding and OnExpanded event handlers are signalled before and after actions to a given tree node.

Use the Selections property to access the list of selected tree nodes when multi-selection has been enabled in the Options for the control. Use the SelectionCount property to get the number of tree nodes in the Selections property.

Color used to paint the background for the selected tree node in the control.
Number of selected nodes in the tree view.

SelectionCount is a read-only Cardinal property with the number of selected Items in the control. SelectionCount contains the value from the SelectionCount property in Items, and indicates the number of TTreeNode instances available in the Selections property.

SelectionCount and Selections are used when the value tvoAllowMultiSelect has been included in the Options property.

Color used to draw the text for a selected item.
Indicates if the selection font color is used for selected items.

The default value for the property is False. Not used in the current LCL implementation.

Provides indexed access to the multi-selected tree nodes in the control.

Selections is an indexed read-only TTreeNode property which provides indexed access to the selected tree nodes in the control. Selections is relevant when tvoAllowMultiselect has been included in the Options for the control. Use SelectionCount to get the number of nodes included in the Selections property.

Use Selected when multi-selection has not been enabled for the control.

Ordinal position in the list of selected tree nodes.
Color used to paint horizontal lines between tree nodes when enabled.

SeparatorColor is a TColor property with the color used to paint horizontal lines between nodes in the tree hierarchy. SeparatorColor is used in the DoPaintNode method when tvoShowSeparators has been included in the Options for the control. It is assigned to the Pen and drawn using the LineTo method.

Image list with the bitmaps used to represent the state for nodes in the tree.

StateImages is a TCustomImageList property which contains bitmaps used to represent the state for nodes in the tree hierarchy. Images in the list correspond to the values used in the TTreeNode.StateIndex property.

Assigning a new value for the property causes the UnregisterChanges method in the image list to be called. The RegisterChanges method in the image list is called after the new images are assigned. The value in DefaultItemHeight is updated (when needed) to use the height for the images scaled to the current PPI setting in Font. The item height will include the default item spacing needed for the images. The control is redrawn when the new image list has been assigned to the property.

Width for the bitmaps in the StateImages property.

StateImagesWidth is an Integer property which contains the width for the StateImages assigned in the control. StateImagesWidth provides the value that is scaled to the Pixels Per Inch setting in the Font property when StateImages have been assigned for the control.

The default value for the property is 0 (zero), and indicates that an explicit image width has not been assigned.

Setting a new value for the property causes the control to the redrawn.

StateImagesWidth is used in the DoPaintNode method to retrieve the scaled image resolution for the bitmaps in StateImages.

Use ImagesWidth to set the width for the bitmaps in the Images property.

TopItem
- the first visible node of the tree.

Use TopItem to get the top-most visible node. It is usually needed when tree view contains many nodes and scroll bar is required to display them all. If you need the first node of the tree regardless of visibility use Items[0].

Items GetNodeAtY
Color used to draw the lines which connect the nodes in the tree.

TreeLineColor is a TColor property with the color used to draw the lines which connect the nodes in the tree. The default value for the property is clWindowFrame. Setting a new value for the property causes the control to be redrawn.

TreeLineColor is used in the DoPaintNode method to set the color for canvas pixels when psPattern is used in the TreeLinePenStyle property. This is done because the LCL does not currently support the psPattern pen style.

TreeLineColor is also used in the DoPaint method to set the pen color when rendering insert marks for the nodes in the tree hierarchy.

Style of the TPen used to draw lines used to connect nodes in the control.

TreeLinePenStyle is a TPenStyle property which contains the pen style used to draw lines connecting the nodes in the tree. TreeLinePenStyle can contain one of the following vales:

- psSolid
- psDash
- psDot
- psDashDot
- psDashDotDot
- psinsideFrame
- psPattern
- psClear

The default value for the property is psPattern.

TreeLinePenStyle is used in the DoPaintNode method to draw the lines which connect the nodes in the tree hierarchy.

Enables or disables navigation using the Tab key.

The default value for the property is True in TCustomTreeView.

TWinControl.TabStop
TTreeView
is a control that displays a hierarchical list of items.

Use a TTreeView to display a hierarchical list of items. Items are shown by their caption and an optional bitmap.

How To Use Standard Controls

The default value for the property is False in TTreeView.

TControl.ParentColor
Enables or disables navigation using the Tab key.

The default value for the property is True in TTreeView.

TWinControl.TabStop
Specifies an event handler used to get the text for a tree node.
Text displayed for the tree node.
Tree node examined in the routine.
Class used to save and restore the expanded state of a TTreeView.

TTreeNodeExpandedState is a class used to save and restore the expanded state of a TTreeView. The nodes are identified by their Text property.

Usage example:

// save old expanded state OldExpanded := TTreeNodeExpandedState.Create(ATreeView); // ... change a lot of nodes ... // restore old expanded state OldExpanded.Apply(ATreeView); OldExpanded.Free;
NodeText
- the text in the current node.
Children
- the children of the current node, as an AvgLvlTree.
Constructor for the class instance.
Destructor for the class instance.
Clear
the expanded nodes for the tree structure.
CreateChildNodes
- constructor for the child nodes.
Used to restore the expanded state for a node or tree view.

Apply is an overloaded procedure used to restore the expanded state for nodes in a tree structure. The overloaded variants allow either a specific tree node or the first node in the tree view to be used to reconstruct the tree structure.

CollapseToo indicates whether child tree nodes are collapsed (when True) or expanded.

Initial tree node examined in the method.
Tree view with nodes examined in the method.
Collapses previously expanded child nodes when True.
Event handler signalled to get the text for the specified tree node.

OnGetNodeText is a TTVGetNodeText property with the event handler signalled to get the text for the tree node passed as an argument. It is signalled from the CreateChildNodes method when the tree node has a parent node, or when expanding its child nodes. It is also signalled from the Apply method to get the text for an expanded child node.

Enumerated type which represents selection states for THeaderSection.

THeaderSectionState is the type used to implement the THeaderSection.State property.

The header section is drawn in its normal state.
The header section is drawn in its "hot-lighted" state.
The header section is drawn in its "pressed" state.
Implements a section displayed on a TCustomHeaderControl / THeaderControl instance.

THeaderSection is a TCollectionItem descendant which implements a section displayed on a TCustomHeaderControl / THeaderControl instance. THeaderSection is the type added and maintained in the THeaderSections collection, and used in the TCustomHeaderControl.Sections property.

THeaderSection has properties which identify its visual characteristics. This includes the text displayed for the section, its alignment, minimum and maximum widths, and an index for an optional image. Other properties contain run-time information about the section, including its left and right coordinates and its display state.

THeaderSection instances are normally created at design-time and edited using the IDE object inspector. They can be created at run-time using methods in the THeaderSections collection, and edited in code.

Gets the value for the Width property.
Value for the property.
Gets the value for the Left property.
Value for the property.
Gets the value for the Right property.
Value for the property.
Sets the value for the Alignment property.
New value for the property.
Sets the value for the MaxWidth property.
New value for the property.
Sets the value for the MinWidth property.
New value for the property.
Sets the value for the State property.
New value for the property.
Sets the value for the Text property.
New value for the property.
Sets the value for the Visible property.
New value for the property.
Sets the value for the Width property.
New value for the property.
Sets the value for the ImageIndex property.
New value for the property.
Ensures that the width for the section is within its minimum and maximum values.
Gets the value for the DisplayName property.
Display name for the collection item.
Constructor for the class instance.

Create is the overridden constructor for THeaderSection, and calls the inherited Create method on entry. The value in ACollection is used as the Owner of the collection item. Create sets the default values for properties in the class instance.

TCollectionItem.Create
Collection which owns the class instance.
Assign
- if Source is of correct type, copies properties directly, otherwise calls inherited Assign which probably raises an exception.
TPersistent.Assign
The position of the left boundary of the section.
The position of the right boundary of the section.
State
- whether normal, hot (i.e. mouse hovers over it ready to be selected) or pressed (selected).
Alignment
- whether text is to be left or right justified or centered.
Index of the image in the imagelist.
Maximum permissible width of a section.
Minimum permissible width of a section (default = 0).
The text string that is to appear in the section.
The Width of the section that appears on the THeaderControl.
Indicates if the section is visible in the header control.

Visible is a Boolean property which indicates if the header section is visible in the header control. When set to False, the section cannot be drawn using the TCustomHeaderControl.PaintSection method.

The default value for the property is True, as set in the constructor for the class instance.

OriginalIndex
- index which doesn't change when the user reorders the sections.
Class reference used to create new THeaderSection instances.
Implements a collection for section in a TCustomHeaderControl control.

THeaderSections is a TCollection descendant used to store sections defined for a TCustomHeaderControl instance. THeaderSections is the type used to implement the Sections property in TCustomHeaderControl.

THeaderSections re-implements methods from the ancestor class that are used to add, insert, delete, and retrieve THeaderSection instances stored in the collection.

TCollection
Gets the value for the indexed Items property.
TCollection.GetItem
Value for the property.
Ordinal position in the collection for the requested item.
Sets the value for the indexed Items property.
TCollection.GetItem
Ordinal position in the collection for the affected item.
New value for the property.
Gets the Owner of the class instance.
TPersistent
Owner of the class instance.
Performs actions needed when a collection item has been changed.

Update is an overridden method used to update the section in the header control. When Item is assigned, the UpdateSection method in the THeaderControl instance is called. If Item is unassigned (contains Nil), the UpdateSections method in the THeaderControl instance is called update all sections in the collection.

Update does not call the inherited method which notifies observers of the change.
TCollection TPersistent.FPONotifyObservers
Section updated in the collection for the header control.
Constructor for the class instance.
TCollection.Create
Owner of the collection.
Creates a new header section and adds it to the collection.

Adds calls the AddItem method to get the return value for the method.

TCollection.Add
Collection item created and stored in the method.
Adds the specified header section at the position specified in Index.

The THeaderSection instance in Item is created when the argument value is Nil (unassigned). The return value contains the new header section instance, or the existing value in Item when it is assigned.

Header section created (optional) and stored in the method.
Header section to add in the method, or Nil to create a new one.
Ordinal position in the collection where the header section is stored.
Inserts a new collection item at the specified position in the collection.
TCollection.Insert
Header section created in the method.
Ordinal position in the collection where the new header section is inserted.
Deletes the collection item stored at the specified position in the collection.
TCollection.Delete
Ordinal position for the collection item deleted in the method.
Items
- the series of individual HeaderSections in the collection.

Items is an indexed THeaderSection property which provides access to the header sections in the collection by their ordinal position. It is implemented using TFpList to store the collection items. Items is the default property for the class instance.

When reading a value in the property, the item is cast to the THeaderSection type used in the collection. SetItem is called to store a value for the indexed property.

Ordinal position in the collection for the property value.
Enumerated type with tracking states for a header section.
Mouse tracking for a section is enabled.
Mouse tracking for a section drag operation is enabled.
Mouse tracking for a section is disabled.
TCustomSectionTrackEvent
- generic event handling method for custom tracking a header section.
TSectionDragEvent
- generic event handling method for dragging a header section.
TCustomSectionNotifyEvent
- generic event notification method for header section.
TCustomHCCreateSectionClassEvent
- generic event handler method for custom creation of header control.
TCustomHeaderControl
- base class for THeaderControl, a header strip of user-designed sections which allow selection of pages or actions.

TCustomHeaderControl - base class for THeaderControl, a header strip of user-designed sections which allow selection of pages or actions.

THeaderControl offers a widget that could be placed along the edge of a Panel or Form allowing a highly customized mechanism for selection. However, there are no intrinsically associated display areas and it is the developer's responsibility to supply an index associated with the selection from the THeaderControl and determining what action is to occur or what is to be displayed in any attached Panel or Form.

Using Multi-Page Controls
Gets the value for the indexed SectionFromOriginalIndex property.
value for the property.
Original position (ignoring visibility) in the Sections property.
Sets the value for the Images property.
New value for the property.
Sets the value for the ImagesWidth property.
New value for the property.
Sets the value for the Sections property.
New value for the property.
Updates the control by calling Repaint.
Updates all Sections in the control by calling Repaint.
Creates a new header section for the control.
THeaderSection instance created in the method.
Creates the collection used to store header sections defined in the control.
THeaderSections instance created in the method.
Handles the notification when a component is added to or removed from the class instance.

Calls the inherited method on entry. Ensures that the Images member is set to Nil when the component is removed from the class instance.

TComponent
Performs actions needed when the mouse is clicked on the specified header section.

Signals the OnSectionClick event handler (when assigned). Called from the Click method when the mouse event occurred on the header section in the Section argument.

Header section for the mouse event.
Performs actions needed to resize the specified header section.

Signals the OnSectionResize event handler (when assigned). Called from the MouseUp method when mouse tracking has been ended for the specified Section.

Header section for the resize action.
Performs actions needed when the mouse tracking state for a header section has changed.

Signals the OnSectionTrack event handler (when assigned). Called from the MouseDown, MouseMove, and MouseUp methods when mouse tracking is active for a section in the header control.

Header section for the mouse tracking state.
New mouse tracking state for the action.
Performs actions to handle a mouse double click event for the specified header section.

Signals the OnSectionSeparatorDblClick event handler (when assigned). Called from the DblClick method when the mouse event occurs when mouse tracking has been enabled for the header control.

Header section for the double click mouse event.
SectionEndDrag
- method for emulating the OnSectionEndDrag event.
SectionDrag
- method to emulate the OnSectionDrag event.
UpdateState
- bring the state of the control up-to-date.
Gets the default size for new instances of the class.
TControl.GetControlClassDefaultSize
Applies an automatic layout policy to the control using the specified scaling factors.
SectionFromOriginalIndex
- the section as defined by the original (unchanged) index.
Constructor for the class instance.

Create is the overridden constructor for TCustomHeaderControl, and calls the inherited Create on entry.

Create allocates resources needed for the Sections property by call CreateSections. It also sets the default size for the control using the values returned from GetControlClassDefaultSize.

The control style flags are updated in the method to include mouse capture and click events and to remove caption display for the control.

TCustomControl.Create
Owner of the class instance.
Destructor for the class instance.

Destroy is the overridden destructor for TCustomHeaderControl. It ensures that resources allocated to the Sections property are freed, and calls the inherited method prior to exit.

TCustomControl.Destroy
Gets the header section at the position specified in P.

GetSectionAt is an Integer function used to get the position for the header section found at the coordinates in P.

GetSectionAt iterates over the THeaderSection instances in Sections to find a matching collection item. A match is found when the X- axis coordinate in P is within the Left and Right values for the header section.

The return value contains the ordinal position in Sections where the header section is stored, or -1 if a header section was not found for the coordinates.

Ordinal position in Sections for the header section.
TPoint instance with the coordinates examined in the method.
Draws the control to its Canvas using highlighting, drag images, and theme details.

Paint is an overridden method in TCustomHeaderControl used to draw the control to its Canvas.

Paint calls the inherited method on entry to signal the OnPaint event handler (when assigned). The display rectangle is updated to reflect the current Width and Height for the control.

Paint iterates over the header sections defined in the Sections property, and calls PaintSection to render each one. If all sections fit within the control display area without scrolling, theme services are used to draw the control to the control to its Canvas.

Paint handles configuring the Canvas and drawing the preview when a section drag operation is in effect.

See PaintSection for more information about the actions performed to draw an individual header section for the control.

TCustomControl.Paint
Paints the specified header section to the Canvas for the control.

PaintSection is a method used to paint the specified header section to the Canvas for the THeaderControl control.

Index contains the ordinal position for the THeaderSection instance in the Sections collection. No actions are performed in the method if the header section is not Visible.

PaintSection draws the header section using the Left and Right properties in the THeaderSection instance. The value in its State property is used to render the section by calling methods in ThemeServices. When Images have been assigned in the control, and the header section has an assigned image index, it is drawn to the Canvas. When Text contains a non-empty value, it is also rendered to the Canvas using the DrawText method in ThemeServices.

Ordinal position for the header section rendered in the method.
Scales the width of the header sections in the control using the specified multiplier and divisor.

ChangeScale is an overridden method in TCustomHeaderControl, and calls the inherited method on entry to scale the overall size for the control and its child controls. ChangeScale applies the scaling factor represented by M and D to the individual header sections defined in the Sections collection. The Width for each THeaderSection instance is updated using the multiplier and divisor to scale the section width.

TWinControl.ChangeScale
Multiplier for the scaling factor.
Divisor for the scaling factor.
DragReorder
- find out if the sections are allowed to be re-ordered by dragging.
Contains bitmaps displayed on the header sections for the control.

The control cannot display images on the header section if Images has not been assigned or is empty.

Use the ImageIndex property for the THeaderSection instances in Sections to assign the image used for the header section.

Specifies the width for Images displayed in the header control.

If ImagesWidth is unassigned (contains 0), the width of the bitmaps in Images is used.

Sections
- the short segments of the header separated by vertical bars that function as the elementary selection units of the header.

Sections is a THeaderSections property with the collection of header sections defined for the control. The THeaderSection instances in the collection contain the size, layout, content, appearance, and state for each header section.

OnSectionDrag
- event handler for dragging the section of header.
OnSectionEndDrag
- event handler for ending the drag process for this section.
OnSectionClick
- event handler for mouse click on this section of header.
OnSectionResize
- event handler for re-sizing this section of the header.
OnSectionTrack
- event handler for tracking this section.
OnSectionSeparatorDblClick
- event handler for double-click on the separator between sections.
OnCreateSectionClass
- event handler for creating a new section class.
THeaderControl
, a header strip of user-designed sections which allow selection of pages or actions.

THeaderControl, a header strip of user-designed sections which allow selection of pages or actions.

THeaderControl offers a widget that could be placed along the edge of a Panel or Form allowing a highly customized mechanism for selection. However there are no intrinsically associated display areas and it is the developer's responsibility to supply an index associated with the selection from the THeaderControl and determine what action is to occur or what is to be displayed in any attached Panel or Form.

THeaderControl is used by selecting its icon from the Common Controls tab of the IDE Component Palette and placing it on the Form in the desired position. It may be convenient to dock it with a Form or Panel whose properties it is to be used for controlling.

After size, position, docking, alignment, anchoring etc have been performed using the Object Inspector or Form Designer, the Sections of the Header can be created by selecting the control, right-clicking with the mouse and choosing 'Section Editor'. A Stringlist editor will pop up with options to add, delete or move entries up or down the list. Each entry is given an Index which can be used in OnClick event handlers to determine the action to be taken when that section is selected at run-time.

Using Multi-Page Controls
Represents the first tab control notification message.
Represents the selection changed notification message for tab controls.
Represents the selection changing notification message for tab controls.
Function to compare the node text in two nodes.

This function does an ANSICompare on the NodeText of two nodes. The parameters Data1 and Data2 are pointers to the nodes to be compared. The result is the same as the result from ANSICompareText. For example:

-1
  The nodetext from the first node is lower than the nodetext from the second.
0
  The nodetext values from both nodes are equal.
1
  The nodetext from the first node is higher than the nodetext from the second.

Function to compare the given text with the nodetext of the specified node.

This function does an ANSICompare on the NodeText of two nodes. The parameters Data1 and Data2 are pointers to the nodes to be compared. The result is the same as the result from ANSICompareText.

-1
  The given text is lower then the nodetext from the given node.
0
  The given text is equal to the nodetext from the given node.
1
  The given text is higher then the nodetext from the given node.

Generates a list of tab control options for display in the debugger.

DbgS is an overloaded String function used to generate string content displayed in the debugger for option values used in TCustomTabControl. DbgS generates a comma-delimited list of option values found in the specified argument using the string representations in TabControlOptionStr.

String with the tab control option values displayed in the debugger.
LCL-compatible tab control options to examine in the routine.
Registers components in the Lazarus IDE.

Register is a procedure used to register components in the comctrls.pp unit in the Lazarus IDE. Register adds the following components:

Common Controls Tab

- TTrackbar
- TProgressBar
- TTreeView
- TListView
- TStatusBar
- TToolBar
- TCoolBar
- TUpDown
- TPageControl
- TTabControl
- THeaderControl

Register adds the following as components with no icon on the component palette:

- TToolButton
- TTabSheet

Calls WSRegisterCustomPage to register a custom page using the widgetset classes.
Registers TCustomTabControl and its widgetset class type when needed.