by Slider (19 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (73 Votes)
** Release 3 **
New cTREEVIEW features: Flat border; IsChildNode; CopyNode with cancel option; Cut Icon state.
ADO example supporting: Load on demand; Find First/ Next/ Previous; Label Edit; Drag'n'Drop; Node & TreeView context menus; node specific Open/Closed/Drag icons.
ADO Example now supports: New Nodes/Records can be added; copy treeview node(s); Cut/Copy/Paste through right-click context menu; and functions are now benchmarked with results displayed.
** Release 2 **
cTREEVIEW class features: Scroll treeview Up/ Down/ PageUp/ PageDown/ Home/ End using code; Dragging with auto-scrolling (not supported by Microsoft in the TreeView control); NodeFirstViewable; & NodeLastViewable.
ADO Example fixes: Find Next/Previous didn't work if branches already loaded. cTREEVIEW class fixes: correct node drag icon displayed.
cTreeview features include: fast clear a treeview; extended Add/Rename/Delete nodes; copy & move nodes through code &/or Drag'n'Drop including parent nodes onto child nodes (not normally possible!); find node using text and (optionally) key properties; check if a node is a parent of another; checks if a node is a root node; a safe get parent node text; right-click context menu (before/after click event); collapse/expand all nodes; collape/expand all child nodes; enable/disable redraw.
This example shows how to:- work with multiple tables of data and load data on demand. As a bonus, I've included cDB class that encapsulates working with an Access Database using ADO. All code is heavily commented.
If there are any routines that you feel are missing or code/bug-fixes that you wish to contribute, then please let me know and I'll add them in. *** Latest version can be found here:- https://www.vbcoders.com/vb/scripts/ShowCode.asp?txtCodeId=37553&lngWId=1 ***
Assumes
The latest version can be found Here!
Download cTREEVIEW Class Wrapper (RELEASE 3) with ADO Code Example (142 KB)