Main Menu (Home)
Delphi Forum
Delphi Tips
Delphi Links
Delphi Chat
Top 20 Downloads
Newest Components
Advertising Information
Advertiser's Edit Page
Show All Banners
Add Component
Add Application
Edit Comps/Apps
What's New
Auto Email System
Events Calendar
Previous Surveys
Submit News Form
Recommend to Friends
Past Articles
Past News
Delphi Pages Setup
Delphi Pages Legend
Contact
Components (All)
----------------------------
Accounting
Animation
Audio
Audio/MPEG
Buttons
Charts/Graphs
Check/Radio/Group
Class Tools
Comm/Winsock
Component Packs
Compress/Backup
Database Controls
Database Tools
Date/Time
Dialogs
Editors/Text
Edits/Combos
Encryption
Examples
Forms/Application
Game Controls
Gauges/Meters
Graphics
Grids
Icons and Glyphs
Install/Help
Labels/LEDs
Localization Tools
Math/Algorithms
Memos/ListBoxes
Menus
Miscellaneous
Multimedia
Non-Visual
OLE Automation/COM
Panels/Splitters
Printers/Ports
Programming Tools
Projects
Query/Search/Filter
Registry/INI
Report Tools
Streaming
System Tools
System/API
Tables/Navigators
Tabs and Books
Toolbars
Tools
Tree/List
Utilities
Video
Web Related
WebApplication/CGI
Win95 Controls
Winsock/TCPIP
Applications (All)
----------------------------
Audio
Calculators
Communications
Compression
Database Management
Distribution Tools
Download Managers
Drive Indexing
eCommerce tool
Education
Email Clients
Encryption/Decryption
File transfer
Games
Graphics
Help Authoring Tools
Interpreters
Miscellaneous
Programming tools
Recoders
Shell Utilities
Statistics
System
Utilities
Web tools
Entire Site
Advanced
Forum
Newest Components
Top 20 Downloads
Edit Comps/Apps
Tips
Chat
Books
TTreeView easy way to add item :)
{
Here is a simple procedure that add Item in TreeView component
classed by level ... usefull for a "debug" ttreeview
}
{Add in the Public declaration}
DebugNode : Array [ 0..9 ] Of TTreeNode;
Procedure AddDebug ( Level : Integer; Text : String );
{Add between Implementation and End.}
Procedure TForm1.AddDebug ( Level : Integer; Text : String );
Begin
If Level = 0 Then
DebugNode [ 0 ] := TreeView1.Items.Add ( Nil, Text )
Else
DebugNode [ Level ] := TreeView1.Items.AddChild ( DebugNode [ Level - 1 ], Text );
End;
Author:
Joel Vandal
WebPage:
http://www.9bit.qc.ca/~jvandal/
Back
Insert New Tip
Home