Description


It serves for output and creation of data in a hierarchical form (tree structure). An example of hierarchical data is the structure of a company. The main configuration of the component is done through the Settings property.



Usage

Using the component, in many ways similar to using the ComboBox component. To use the TreeView component, you need to create a separate database table and a foreign key in another database table, which will store the user's selection. To use this component, you must also create an additional field in the database table (Parent ID), the field is required for the formation of records in a hierarchy, it automatically stores the identifier of the parent record.

Component allows you to create/edit/delete records, through context menu, without using additional forms and buttons (property Editable).

If necessary, you can create and edit records using a form, for this component has a Form property, in which you can select the form for these purposes.


Component properties

 Property

 Description

 Settings

 Allows you to configure the component to show records from the database. More info.

 Editable → AllowCreate

 Responsible for the ability to create new records directly in the component.

 Editable → AllowEdit

 Enables editing records directly in the component.

 Editable → AllowDelete

 Enables the ability to delete entries directly in the component.

 Font → Color

 Specifies the font color to use when displaying the text.

 Font → Name

 Identifies the typeface of the font.

 Font → Size

 Specifies the height of the font in points.

 Font → Style

 Determines whether the font is normal, italic, underlined, bold, and so on.

 Form

 Allows you to select the form for creating/editing records.

 HeaderStyle

 Allows you to select the header style for columns.

 Increm. Search

 Allows you to select the button with the action "Search" or "SQL query", which will be automatically clicked when the user changes the value of the component for immediate search.

 Name

 Specifies the name of the component.

 Left

 Specifies the horizontal coordinate of the left edge of a component relative to its parent.

 Top

 Specifies the Y coordinate of the upper-left corner of a control, relative to its parent or containing control in pixels.

 Width

 Specifies the horizontal size of the control in pixels.

 Height

 Specifies the vertical size of the control in pixels.

 TabOrder

 Indicates the position of the control in its parent's tab order.

 TabStop

 Determines if the user can tab to a control.

 Visible

 Specifies whether the component appears onscreen.

 Anchors

 Specifies how the control is anchored to its parent. More info.




Additional properties

 Property

 Description

 AppearanceOptions

 Configuring the appearance of the component. Подробней.

 AutoScroll

 Determines whether the scroll will be moved automatically to make the selected entry visible.

 BiDiMode

 Specifies the bi-directional mode for the component.

 Caption

 Allows you to write an caption on the component. The caption will disappear after the component is filled with data.

 Color

 Specifies the background color of the component.

 Constraints

 Specifies the size constraints for the component.  It makes sense when using the Anchors property.

 Cursor

 Specifies the image used to represent the mouse pointer when it passes into the region covered by the component.

 DefaultRowHeight

 Defines the height of the rows.

 Enabled

 Controls whether the component responds to mouse and keyboard events.

 EnableVisualStyles

 Using visual styles for headings.

 ExpandLock

 Allows you to prohibit the collapse of nodes.

 FixedCols

 Specifies the number of fixed columns that will not be affected by horizontal scrolling.

 FooterSize

 Determines the height of the footer.

 GridLinesColor

 Defines the color of the lines that separate columns and rows.

 GridLinesStyle

 Defines the style of lines that separate columns and rows.

 GridStyle

 Allows you to select the style of the component. The gsSlides style requires the use of a script.

 HeaderSize

 Defines the height of the headers.

 HideScrollBar

 Determines whether the vertical scroll will be hidden when it is not needed.

 HighlightedTextColor

 Defines the color of the text in the selected row or cell.

 Hint

 Hint contains the text string that appears when the user moves the mouse over the component. The hint will be shown if the ShowHint property = True

 HomeEndBehaviour

 Defines the behavior of the Home and End buttons. hebTopBottom - move between the first and last entry, hebLeftRight - move between the first and last column.

 InactiveSelectionColor

 Determines the background color of the selected row or cell when the component has no focus.

 InputSize

 Defines the height of the zone to create a new record.

 KeepUserSort

 Determines whether the component will remember the column by which the user did the sorting, otherwise the sorting is defined in the component or button settings.

 MouseWheelEnabled

 Determines whether the component will respond to mouse scrolling.

 Options

 Additional component settings. More info.

 ReadOnly

 Allows you to disable data editing in a component.

 SelectionColor

 Defines the color of the selected row or cell. Makes sense if the AppearanceOptions → aoAlphaBlendedSelection property = False

 ShowHint

 Determines whether the control displays a Help Hint when the mouse pointer rests momentarily on the component. See also property Hint

 ShowLines

 Show lines in the tree.

 SortedStyle

 Allows you to set the sorted column selection style.

 WantTabs

 Determines whether the Tab key will move the focus between cells within a component or whether the component will pass the focus to another component.