Unit dbTree

Classes

TCustomDBTreeView -
TDBTreeView -
TTreeIDNode -
TTreeViewLink -

Functions

Types

TDBTreeOption
TDBTreeOptions
TDBTreeViewState
TDBTreeViewStates
TDBTVGetNextIDEvent
TTVFindTextOption
TTVFindTextOptions

Constants

Variables

sdbtvDefaultDeleteQuestion


Functions


Types


TDBTreeOption = (
    dtAllowDelete, dtAllowInsert, dtAutoDragMove, dtAutoExpand,
    dtAutoShowRoot, dtCancelOnExit, dtConfirmDelete, dtFocusOnEdit,
    dtInsertAsChild, dtMouseMoveSelect, dtRebuildFocusedOnly,
    dtRootItemReadOnly, dtSynchronizeDataSet);

TDBTreeOptions = set of TDBTreeOption

TDBTreeViewState = (
    dtvsBuilding, dtvsDatasetInEditMode, dtvsEditAfterReBuild,
    dtvsDatasetInInsertMode, dtvsLostFocusWhileDatasetInEditModes,
    dtvsChangingDataset, dtvsNeedReBuildAfterPost, dtvsNeedReBuild,
    dtvsDataSetNeedsRefresh);

TDBTreeViewStates = set of TDBTreeViewState

TDBTVGetNextIDEvent =
    function (Sender: TObject; DataSet: TDataSet): string of object
Options: dtAutoDragMove: The user can move items by dragging them in the DBTreeView. The parent-field of the record of the moved item will be set to the ID of the new parent automatically. dtAutoExpand: The tree will get expanded completely after building. dtAutoShowRoot: The ShowRoot property specifies whether lines connecting root (top- level) items are displayed. If dtAutoShowRoot is in Options, the DBTreeView will set the ShowRoot property itself, depending on the numbers of root-items: If are more then one of them, the DBTreeView will set the ShowRoot property to True, otherwise it will set the ShowRoot property to False. ShowRoot = True will show lines connecting the root items if the ShowLines property is True, and If ShowButtons is set to True, a button will appear to the left of each root item. dtCancelOnExit: An insertion-operation get canceled if the user leaves the DbTreeView without changing the inserted record. This avoids empty records in the table. DtCancelOnExit is similar to dgCancelOnExit of TDBGrid. dtConfirmDelete: The user gets asked if he really want to delete the current record after he pressed the Del-key. If the current record has children, the user gets asked if he want to delete them first. dtFocusOnEdit: If the dataset changes to edit- or insert-mode, the DbTreeView will get the focus. This allows to user to edit the tree-node directly after pressing edit or insert on a navigation-button. Also, if the dateaset is in edit- or insert-mode and the DbTreeView receives the focus, the selected node goes into the edit-mode. Please do not set dtFocusOnEdit if there is TDBEdit, TDBMemo or TDBGrid on the form connected to the same dataset - the user could get confused too much. Also, please set dtSynchronizeDataSet too if you use dtFocusOnEdit. Setting dtFocusOnEdit is recommended if there is - more or less - only a DbTreeView and a DBNavigator on the form. dtInsertAsChild: The new item that is created by pressing the insert key gets inserted after the selected node if tveInsertAsChild is false or it gets inserted as a child of the selected node if tveInsertAsChild is true. dtMouseMoveSelect: If the user moves the mouse, the nearest node gets selected. If the user moves the mouse to the upper or lower border of the DbTreeView while left button pressed, the DbTreeView will scroll. This scrolling happens anyway if the user drags a node. The option dtMouseMoveSelect makes sense if the DbTreeView is shown in a dropdown-panel. dtRebuildFocusedOnly: If dtRebuildFocusedOnly is in Options, the DbTreeView will not rebuild the tree after the dataset changed unless the DbTreeView gets the focus. This is not set by default. The TDbTreeLookupComboBox uses this option to avoid needless rebuilds of the DbTreeView in the drop- down-panel until it gets visible. dtRootItemReadOnly: If there is a record in the dataset with the ID of RootID, then you can set it to read-only by setting RootItemReadOnly to true. dtSynchronizeDataSet: The current selected treenode will always represent the current record of the DataSet. If not dtSynchronizeDataSet in Options, selecting treenodes gets faster.
TTVFindTextOption = (tvftCaseInsensitive, tvftPartial);

TTVFindTextOptions = set of TTVFindTextOption

Constants


Variables

sdbtvDefaultDeleteQuestion : string