Skip to content

Commit 33b0fdc

Browse files
committed
readme commit
readme files have been added
1 parent d9c3d5f commit 33b0fdc

File tree

2 files changed

+110
-0
lines changed

2 files changed

+110
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
2+
1. Unpack downloaded zip file into a folder.
3+
4+
2. In Your Delphi IDE go to menu item
5+
6+
Component \ Install Packages...
7+
8+
press 'Add' button, go to the folder
9+
where You've unpacked DBGridTreeView files
10+
and select DBGridTreeView_Dxxxx.bpl,
11+
press 'Open' button on 'Add Design Package'
12+
dialog window and finally press 'OK' button
13+
on the installed packages dialog window.
14+
or
15+
in Delphi Turbo Explorer open dclusr package
16+
and add AdvDBGrid_Reg files (dcu + dcr)
17+
then rebuild dclusr package.
18+
19+
3. Go to Tools \ Environment Options \ Library
20+
and check if folder where You've unpacked files
21+
is included in Library path. If not then add it.
22+
23+
24+
2013-04-28 v1.12 Release
25+
-----------------------
26+
new version 1.12 of TTreeDataset
27+
28+
29+
2013-04-05 v1.11 Release
30+
-----------------------
31+
new version 1.11 of TTreeDataset
32+
and changes DEMO application
33+
34+
35+
2013-03-30 v1.1 Release
36+
-----------------------
37+
new version 1.1 of TTreeDataset
38+
and changes DEMO application
39+
40+
41+
2013-03-22 v1.0 Release
42+
-----------------------
43+
TDBGrid descendants for browsing tree data structures.
44+
if assigned TDataset is not recognized as TTreeDataset
45+
then TDBGridTreeView acts exactly as standard TDBGrid.
46+
47+
published properties
48+
OnPopupListDropDown: TSelectedColumnEvent;
49+
OnPopupListCloseUp: TSelectedColumnEvent;
50+
51+
TTreeViewParams: TTreeViewParams;
52+
ButtonStyle: TDBGTVButtonStyle read FButtonStyle write SetButtonStyle
53+
default bsRectangle;
54+
LineStyle: TDBGTVLineStyle read FLineStyle write SetLineStyle
55+
default lsDotted;
56+
TreeColumnAlign: TBGTVTreeColumnAlign read FTreeColumnAlign
57+
write SetTreeColumnAlign default tcaAlignToTree;
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
1. Introduction
2+
3+
Dynamic DBTreeView controls are based on Virtual TreeView control. They are using clone dataset for internal data manipulation when dynamically building tree nodes and a binary search list for detecting existing nodes. They reflect all changes of underlining dataset (record insertion, deletion, field value change) and support drag and drop operation and node caption editing. There are three controls: TDTADOTree, TDTClientTree, TDTTableTree for TCustomADODataSet, TCustomClientDataSet and TTable accordingly. If your dataset supports filtering and you can create its clone dataset, you can derive your own treeview by overriding CreateCloneDataSet method of the TDTCustomDBTreeView control.
4+
5+
2. Installation.
6+
7+
To install Dynamic DBTreeView controls, Virtual TreeView control must be installed. You can download Virtual TreeView self-installing program at www.soft-gems.net  (in this case skip paragraphs 2.2., 2.3.). Bellow X in dpk files denote Delphi version (5, 6, 7 – Delphi 5, 6, 7,
8+
9 – Delphi 2005).
9+
10+
2.1. Unzip DTTreeView.zip in a directory of your choice.
11+
12+
2.2. To install Virtual TreeView for Delphi 5, 6 you need to install ThemeManager. To install it Add the directory ...\ThemeManager\Source to your Delphi search path. Open in Delphi ...\ThemeManager\Delphi\thememanagerdXd.dpk and press Compile and Install buttons.
13+
14+
2.3. Virtual TreeView installation.
15+
Add the directory ...\VirtualTreeView\Source to your Delphi search path. Open in Delphi ...\VirtualTreeView\Delphi\virtualtreesdXd.dpk and press Compile and Install buttons.
16+
17+
2.4. Dynamic DBTreeView installation.
18+
Open in Delphi ...\DynamicDBTreeView\Delphi\dttreeviewdXd.dpk and press Compile and Install buttons. Add the directory ...\DynamicDBTreeView\Source to your Delphi search path.
19+
20+
3. Working with Dynamic DBTreeView.
21+
22+
Place Dynamic DBTreeView control on the form. Set its DataSource property. Take care that DataSource Dataset is of appropriate class. Besides, your dataset must have key field, parent field and list field. Key field value must uniquely identify dataset record. Parent field must contain the key value of the parent record. The list field value will be used for drawing node text. Set properties of DBTreeFields object. Set its KeyFieldName property to the name of the key field, ParentFieldName property to the name of the parent field and ListFieldName property to the name of the list field. Set ParentOfRootValue property to the parent field value of the records that don't have parent. To specify more than one field, separate each field name with a semicolon. To allow drag and drop operation set DragMode property to dmAutomatic. To edit node caption you must set TreeOptions.MiscOptions.toEditable to True.
23+
Dynamic DBTreeView automatically detects if the node (record) has children by going through dataset, but if dataset is big or if node has many children this operation may become very time consuming. To avoid it HaschildrenFieldName property of DBTreeFields object has been introduced. To use it, your dataset must have Boolean field whose value must be True if record has children. In this case you must yourself update it when inserting or deleting records. (See Demo2).
24+
25+
To set up DBTreeView images assign first a image list to its Images property. To define images of individual nodes use TDTDBTreeImages object.
26+
HasChildrenImageIndex property specifies which image is displayed when a node has children and is in its normal state and is not currently selected
27+
HasChildrenSelectedIndex property specifies which image is displayed when a node has children and is currently selected
28+
NoChildrenImageIndex property specifies which image is displayed when a node do not have children and is in its normal state and is not currently selected
29+
NoChildrenSelectedIndex property specifies which image is displayed when a node do not have children and is currently selected.
30+
You can override this behavior by writing OnGetImageIndex event handler.
31+
32+
To navigate in TreeView you can use the following methods: GoTop, Next, EndOfTree, GoUp, GoDown.
33+
34+
To save nodes individual properties in the list items use Param property of TDTNodeItem and OnDBTreeCreateNode event handler. You can use them in OnPaintText or GetImageIndexEx handlers. See Demo3.
35+
36+
To use multiple columns add columns to DTDBTreeView Header.Columns object. Set their properties and set FieldName property to field name that this column must represent. In this case ListFieldName property of DBTreeFields is not necessary.
37+
38+
4. License.
39+
40+
Dynamic DBTreeView controls are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.mozilla.org/MPL.
41+
42+
Alternatively, you may redistribute this library, use and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. You may obtain a copy of the LGPL at www.gnu.org/copyleft.
43+
44+
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
45+
46+
The Initial Developers of the Original Code are Andrew Yushev, Alex Troitsky, Borus software.
47+
48+
If you have any comments or suggestions, send them to info@table-report.com.
49+
50+
Another Borus software product - TableReport - fast, powerful, user-friendly reporting tool for Delphi, C++Builder. For more information visit our website - http://www.table-report.com .
51+
52+
Andrew Yushev
53+
Borus software

0 commit comments

Comments
 (0)