MetabaseTreeCombo

Inheritance Hierarchy

          IComponent

          IControl

          ITreeControl

          ITreeCombo

          IMetabaseTreeCombo

          MetabaseTreeCombo

Description

The MetabaseTreeCombo component is used to display the repository object tree as a drop-down list.

Working with the Component

By default the component does not display anything. To define the directory, contents of which should be displayed in the component, use the following property  Root. The list of displayed objects can be changed by defining required filter in the  Filters property. Each tree element is a reference to the corresponding repository object. To get some information on corresponding object, cast the tree node to the  IMetabaseTreeListNode  interface (transform the object using the keyword As) and get the  ObjectDescriptor property.

The main list of properties and methods of this component is inherited from TreeCombo, therefore you work with this component in the same way as you work with the tree of the TreeCombo component. The methods used to change the element hierarchy are not supported in this component.

You can use the button to reset tree elements selection.

NOTE. You can resize the drop-down list of elements by dragging its right, left or bottom border with your mouse. The minimum width of the drop-down list equals to the component width.

Element Search

The following types of search are available from the expanded drop-down list:

If search has been successful, the cursor will focus on the found element. Selection state depends on value of the  FindMode property. Depending on the  chosen multiple selection mode  you can add an element to selection either by selecting it using the Space key or selecting it with the mouse cursor while holding down the CTRL key.

You can also search for elements with the component drop-down list collapsed. When the component is focused, entering a set of characters creates a list of elements whose names contain this set of characters:

Elements are selected using the above-given method, depending on the value defined in the  SelectionMode property. Closing this dialog box applies the selection to the component.

You can search for one or several words based on segments in any mode. To do this, separate the search combinations with whitespace character. The word order in the names of search elements is ignored.

Sorting Data

Data sorting is available if the  ShowColumnHeaders, Sorted  and the  ColumnClick  properties have the True value, and the  SortType  property has a value other than None.

When you are in the form executing mode, click the caption of the appropriate column to sort data by it. The data are sorted ascending. Double-clicking changes the sorting direction. To sort data by multiple columns, click the headings of the required columns while holding down CTRL key. The sorting order is as follows: the column whose caption is clicked last is sorted last.

Sorting parameters can also be defined in the Sorting specialized dialog box:

This dialog box opens when selecting the appropriate item from the context menu called from the column heading area.

NOTE. The context menu option is available if the  ShowColumnHeaders  and the  Sorted  properties have the True value, and the  SortType  property should have a value other than None.

Move the columns used to sort by to the selection list. The and buttons are used to change sorting direction by the selected column. The and buttons are used to change the sorting order. Columns at the top of the list are sorted first.

In the Fore language, to apply sorting, you need to set to the  Sorted  property the True value, and the  SortType  property should have a value other than None. The column data of which is sorted is defined in the  SortColumn. Sorting direction is defined in the  SortAscending  property of the corresponding column.

Sorting can also be managed by the  Sort  and  SortDefault methods.

Component Filters

To set up filtering for objects displayed in the component tree, take one of the following steps:

This window shows a list of filters applied to the component.

The list is displayed as a table made up of two columns:

In this window, you can create new filters, or edit and delete existing filters. You can select multiple filters in the table, though these selected filters can only be deleted.

You can edit a filter description. To do this, select the required filter and click the description with your mouse. After a few seconds a dialog box for editing a description is opened. You can also use the hot key F2.

Creating Object Filter

To create a new object filter, take one of the following steps:

In the dialog box that opens, select the type of the created filter. The available types are:

In the class tree, select object classes, which are available when this filter is used. Use the Show Subclasses checkbox to disable displaying of additional object classes in the tree.

In the Create the Following Type of Filter: field, specify how you want the filter to be saved:

Clicking the OK button creates a new filter (filters) for the selected object classes.

Editing an Object Filter

To edit a filter, take one of the following steps:

Depending on the type of created filter (a separate filter for a class (subclass) or a compound filter), the dialog box for filter editing appears:

Separate filter for the class (subclass).

Compound filter

In this dialog box, you can change the object class (subclass or their combination for a compound filter) for which the filter is created, or modify filter description. Clicking OK saves the changes.

Filter Deleting

To delete a filter (filters), select it from the table and take one of the following steps:

This deletes the filter.

Example

Properties of the MetabaseTreeCombo Component

  Property name Brief description
The Align property determines the behavior of the component, when the size of its parent component is changed.
The AllowDrag property determines whether an object can be dragged from the component.
The AllowDrop property determines whether the component can accept a dragged object.
Outdated. Use  SelectionMode.
The Anchors property returns settings that determine the percentage of the size change for the current component when the parent component is resized.
The AnimationType property determines type of animation to be used when component's list is expanded.
The AutoCheckParent property determines, whether the parent nodes of the component should automatically receive an indefinite state, if not all of the child elements are selected.
The AutoUpdateInfo property determines indicator of automatic update of information on selection in the component editor.
The BorderStyle property determines the style of the border of the component.
The Brush property specifies the brush used to fill the component area.
The CancelOnEscape property determines whether selection should be cancelled, and the list - closed, when the «Escape» key is pressed.
The Checkboxes property determines whether check boxes of the component elements should be present.
The CheckedObjects property returns a collection of descriptions for objects whose flags are set in the component.
The ClientHeight property is used to receive or specify the height of the component’s client space.
The ClientWidth property is used to receive or specify the width of the component’s client space.
The CloseOnClick property determines whether the list should be automatically closed, when one of the elements is selected with a mouse click.
The CloseOnEnter property determines whether the list should be closed, and the selection - saved - when the ENTER key is pressed.
The Color property determines the background color of a component.
The ColumnClick property determines whether it is possible to display the component column headings.
The Columns property returns the component columns collection.
The ComponentCount property returns the number of child components.
The Components property returns the child component.
The Cursor property determines the look of the cursor over the component.
The Data property is used to store any custom data.
The DelayedFill property determines how an object tree is built in a component.
The DisplayMode property determines how objects are displayed in a component tree.
The Dropped property returns the status of the drop-down menu.
The DroppedListHeight property determines height of the component's drop-down menu.
The DroppedListWidth property determines width of the component's drop-down menu.
The DroppedPopupMenu property determines context menu which can be opened in the area of the components's drop-down menu.
The DropTargetNode property determines the component node, over which a user is currently dragging another node.
The Enabled property determines whether the component is available for the user.
The EnableFindDialog property determines whether the standard element search dialog should be open when the CTRL+F key combination or F3 key is pressed.
The EnableInfotips property determines how object information is shown in a tooltip.
The FindEditVisible property determines whether a search string is displayed when the component drop-down list is expanded.
The FindMode property determines mode of marking found elements.
The Filters property returns a collection of filters used to filter objects displayed in the component.
The FilterStyle property determines mode of creating a tree of filtered elements.
The Focused property returns True if the focus is set on the component.
The FocusedNode property determines the node, which is currently focused.
The Font property determines the set of characteristics, describing the font, used to display text.
The GridLines property determines whether grid should be displayed.
The HeaderMenu property determines the context menu, which is called by clicking the caption of the component column using the additional mouse button.
The Height property determines the component height.
The HelpContext property determines a unique index for the context help section for this component.
The HideSelection property determines whether the selected component element should remain selected, when the focus goes to another component element.
The HighlightTrack property determines whether to highlight element on mouse over.
The Hint property determines the hint text for the component.
The HotTrack property determines whether the elements should be underscored on mouse over.
The HotTrackAutoExpand property determines whether the state of children tree is changed on clicking a selected element.
The Images property contains the list of images, used for tree nodes display.
The InnerRoot property returns parameters of inner root node of the tree.
The Left property determines the coordinate of the left border of the component.
The Locked property determines whether it is possible to change selection and edit elements.
The Metabase property determines a repository associated with a component.
Outdated. Use SelectionMode.
The Name property determines the component name.
The Nodes property returns the component items collection.
The Parent property determines the parent component.
The ParentColor property determines whether the component inherits the color of the parent component.
The ParentFont property determines whether the component should use the font of the parent component.
The ParentShowHint property determines whether a tooltip is displayed.
The PopupMenu property determines the context menu to be displayed on right-click.
The ReadOnly property determines whether the elements are available for editing.
The Root property determines the root directory whose contents is displayed in the component.
The RowSelect property determines whether the whole row should be highlighted, when an element is selected.
The Scrolls property returns parameters of component's scrollbars.
The Selected property determines the last selected tree element.
The SelectedObjects property returns a collection of descriptions for objects selected in the component.
The Selection property returns the tree element selection.
The SelectionMode property determines the mode of selecting component elements.
The ShowButtons property determines whether hide/show child elements buttons should be displayed.
The ShowColumnHeaders property determines, whether column headers should be displayed.
The ShowEditImage property determines whether the icon element should be displayed in the component editor.
The ShowEmptyFolders property determines whether empty folders are shown in the factors tree.
The ShowHint property enables and disables showing a hint for the component.
The ShowHints property determines whether hints should be displayed when the mouse hovers over elements.
The ShowInternalObjects property determines whether internal objects are displayed in the repository object tree.
The ShowLines property determines whether the line, connecting a node with its children, should be displayed.
The ShowShortCuts property determines whether labels are displayed in the component element tree.
The SortColumn property determines the index of the column, by which sorting should be performed.
The Sorted property determines whether it is possible to perform sorting by the column specified in the  SortColumn property.
The SortType property determines the component sorting type.
The StateImages property determines the source of icons for the selected elements.
The TabOrder property determines the component position in the tab order.
The TabStop property determines whether the focus is set to a component when the TAB button is pressed.
The Tag property is not used by the compiler. The user can change the value of the Tag property and use it as required.
The Text property determines the row identifying a component for user.
The Top property determines the coordinate of the top border of the component.
The Visible property determines the visibility of the component during execution.
The Width property determines the component width.

Methods of the MetabaseTreeCombo Component

  Method name Brief description
The AdjustDroppedListWidth property adjusts width of the component's drop-down menu.
The AdjustWidth method is used to automatically fit a column based on its contents.
The BringToFront method brings a component to front.
The ClientToScreen method converts point coordinates relative to component coordinates into display coordinates.
The DoDragDrop method starts drag-and-drop operation.
The DropDown method expands the drop-down menu.
The FindByDescriptor method searches for a node of the component tree matching the specified repository object.
The FindItemByKey method searches for a node in a component tree based on a repository object key.
The GetImage method returns a graphic presentation of a component together with all child components.
The GetItemAt method gets the component element in the specified point.
The GetItemObject method returns description of the repository object corresponding to the specified tree node.
The HitTest method is an enhanced version of the  GetItemAt method.
The RollUp method collapses the drop-down menu.
The ScreenToClient method converts screen coordinates of a point to coordinates specified relative to the component coordinate system.
The SelectElem method selects the tree node corresponding to the specified repository object.
The SelectElemKey method selects the tree node corresponding to a repository object with the specified key.
The SendToBack method sends a component to back.
The SetFocus method sets focus to this component.
The Sort method sorts by the values of the specified column.
The SortDefault method sorts by the contents of the column, which index is specified in the SortColumn property.
The UpdateInfo method updates data.

Events of the MetabaseTreeCombo Component

  Event name Brief description
The OnAdded event occurs when a new element is added.
The OnBeginDrag event occurs for a component, when a user starts to drag an object from the component.
The OnBeginFilter event occurs at the start of filtering of component elements list.
OnBeginSearch event occurs when elements are started to be searched in the component.
The OnChecked event occurs when the element check box is selected.
The OnChecking event occurs, when the element check box is selected.
The OnClick event occurs if a user clicks a component area using the main mouse button.
The OnCollapsed event occurs after collapsing the hierarchy of the tree node children.
The OnCollapsing event occurs before collapsing the hierarchy of tree node children.
The OnColumnClick event occurs on mouse click on the component column header.
The OnCompareItems event occurs during comparing two elements during the user element sorting.
The OnDblClick event occurs if a user double-clicks a component area using the mouse button.
The OnDeleting event occurs, when the element is deleted.
The OnDragDrop event occurs for a component if a user drops a dragged object over it.
The OnDragEnter event occurs when a dragged object crosses the borders of this component.
The OnDragLeave event occurs when a dragged object leaves the borders of this component.
The OnDragOver event occurs for this component when a user drags a dragged object over it.
The OnDropDown event occurs on expanding the component list.
The OnEdited event occurs on exiting the mode of editing the contents of the component current record field.
The OnEditing event occurs when changing to the mode for editing the field contents of the current component entry.
The OnEnter event occurs when a component receives focus.
The OnExit event occurs when a component loses focus.
The OnExpanded event occurs after expanding the hierarchy of tree node children.
The OnExpanding event occurs directly before expanding the tree node children hierarchy.
The OnFilter event occurs after the list of components is filtered.
The OnFocusedChanged event occurs, when the focus is moved to another component element.
The OnFocusedChanged event occurs, when the focus is moved to another component element.
The OnGetElementPopup event occurs when on calling a context menu for a tree element.
The OnGetHint event occurs when a hint appears over the element, over which the mouse cursor is located.
The OnGetNodeImage event occurs on determining an image near the tree element.
The OnGetNodeStateImage event occurs on determining the state images near the tree element.
The OnHover event occurs when you hover over the element with your mouse and underline it.
The OnHScroll event occurs when the horizontal scrollbar slider changes its position.
The OnIsBrowseableElem event is used to determine whether a tree element is displayed.
The OnIsDynamicElem element is used to determine whether a folder child element tree is dynamically created.
The OnIsEmptyFolder event is used to determine whether a folder is empty.
The OnIsFolderElem event is used to determine whether elements displayed in a component tree have folders.
The OnKeyDown event occurs if a component is focused and a keyboard key is pressed.
The OnKeyPress event occurs if a component is focused when a user presses a character key.
The OnKeyPreview event occurs prior to each event requiring clicking.
The OnKeyUp event occurs if a component is focused and a user releases any button previously pressed.
The OnMouseDown event occurs when the pointer is in component area and a mouse button is pressed.
The OnMouseEnter event occurs when mouse cursor enters the component area.
The OnMouseHover event occurs when mouse cursor is held in the component area.
The OnMouseLeave event occurs when mouse cursor leaves the component area.
The OnMouseMove event occurs on moving the cursor over component.
The OnMouseUp event occurs on releasing mouse button when the cursor is in component area.
The OnMouseWheel event occurs if the component has focus when the mouse wheel is rotated.
The OnRollUp event occurs when the component list is collapsed.
The OnSearch event occurs after the element search in the component is finished.
The OnSelected event occurs after selecting a node.
The OnSelecting event occurs before selecting a node.
The OnSelectionChanged event occurs when the componen element selection is changed.
The OnUnselected event occurs after deselecting a node.
The OnUnselecting event occurs before deselecting an element.
The OnVScroll event occurs when the vertical scrollbar slider changes its position.

See also:

Additional Components