Quick Search for:  in language:    
YES,ADO,Release,Added,BackMode,BackColor,Back
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
Visual Basic Stats

 Code: 3,149,602. lines
 Jobs: 144. postings

 How to support the site

 
Sponsored by:

 

You are in:

 
 
PDC 2003: Make the connection
Login



Latest Code Ticker for Visual Basic.
Click here to see a screenshot of this code!HistoryWriter Add-In V.1
By Zvonko Kostovski on 9/3

(Screen Shot)

Click here to see a screenshot of this code!Control Winamp
By Dennis Wollentin on 9/3

(Screen Shot)

Fake Virus Version 1.0
By C.J. Laing on 9/3


][String Encoder
By Andron Smth on 9/3


Font Catalog
By Bill Adams on 9/3


professional search
By Ziad Said on 9/3


Click here to see a screenshot of this code!Drew's Meta Tag Generator
By Drew Phillips on 9/3

(Screen Shot)

Fast BruteForce Class
By §e7eN on 9/3


Click here to see a screenshot of this code!Lotus Domino Exploit Scanner
By §e7eN on 9/3

(Screen Shot)

Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

cTreeView Class wrapper v02.03.00 (**Updated 16/8 - Animated Graphic TreeBack Demo - UNIQUE!**)

Print
Email
 

Submitted on: 8/2/2002 2:19:06 PM
By: Slider 
Level: Intermediate
User Rating: By 80 Users
Compatibility:VB 6.0

Users have accessed this article 13546 times.
 
 
     ** Release 6 ** Added BackMode, BackColor, BackPicture, BackFileName, DisableMultiSelect, New Tutorial (Disable Multi-Node Select), updated Tutorial 1 (demonstrate new Back features) and added Animated TreeView Image Background (YES - A first! Pretty unique huh!). BackColor & BackPicture work independantly of the Nodes therefore Nodes maintain their original colors! No other VB code does this - enjoy! ** Release 5 - 26 New Features, 2 new Tutorials ** Now boasts 75 Properties & Methods (features), 7 tutorial/example applications and detailed Html help files and still growing! New features include:- **Disabled Nodes Interface** with full keyboard and mouse support (Unique!), HitTestEx (with comprehensive feedback), IsNodeTextUnique, IsPathExpanded, NodeAbsolutePosition, NodeAbsoluteIndex, NodeCoord, NodeCountChildren (recursively for all sub-branches), NodeFindEx1 (containing), NodeFindEx2 (advanced pattern-matching), NodeFindObjectInTag (advanced pattern-matching), NodePosition, NodeUniqueText, SubNodesSorted, and EditLabelMaxLength. The Disabled Nodes Interface allows individual nodes to be enabled/disabled (not selectable) and toggled with the ability to affect child nodes with a single command; disabled Fore/Back colours and Bold state are programmable (preserves the original Forecolor, Backcolor and bold status of each individual node) and fires a StateChange event when a node or a range of nodes are disabled/enabled. The treeview control by itself is a powerful control when used properly. This wrapper is designed to deliver the most common and also complicated features that's expected from the control but are not included or are very difficult to implement. [See the animated ScreenShots for examples of the new features] The included tutorials also demonstrate how to tie multiple ADO recordsets to a Treeview control with drag'n'drop automatic updates(move & copy nodes and branches), load-on-demand for instataneous display of large amounts of data; benchmarking; cursor management; TabStrip management; working with common dialogs through APIs; and much, much more...

This article has accompanying files

 
 
Terms of Agreement:   
By using this article, you agree to the following terms...   
1) You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
There is an update to this project that can be found at from PSC! Read decription for details on the 3 bugs fixed.

winzip iconDownload article

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzipto decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
3)Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this article, you agree to the following terms...   
1) You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.


Other 18 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this article(in the Intermediate category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
8/2/2002 2:48:46 PM:Carles P.V.
I wonder how you still can improve this... Great, great work! (as usual)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/3/2002 4:03:32 AM:Robert Rayment
Overwhelming - you lucky people *****
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/3/2002 8:05:12 AM:Coite Moss
Exceptional - All 5 Globes - No doubt this kills the TreeView control supplied with VB. Go away Microsoft, we have Slider.... If -all you need- is the Treeview this really reduces project distribution size.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/5/2002 6:05:38 AM:Valenitn
I wonder if you can solve a problem with TreeView when visible part of the structure gets normalized by left points of nodes, thus hiding checkboxes under left side of TreeView panel. It's no problem while user controls tree by mouse, but very uncomfortable if checkboxes are needed and actions are controlled programmatically. The cure is API, of course, but the tricky part is it doesn't valid for all and every config. When I've tried it and consulted with some programmer, the same code did well on his config (VB6 SP3 or 4, NT), but failed on mine (Win 98, otherwise all the same). No crash, just doing nothing...
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/6/2002 11:52:53 AM:speedy5
I can't believe this code!! There's too many features that i can't possibly use them all! The one thing i learnt from your project was invaluable: preprocessor statements like #if. I didn't know vb had any until I saw your code. If only I could vote higher than a 5... :)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/6/2002 12:19:45 PM:speedy5
I have a question, may I use this for my possibly commercial application (you will be given credit)? Please reply quickly. Thanks, Speedy
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/6/2002 8:39:45 PM:Slider
Speedy5, Thanks for your comments. I'm happy for you to use the code in your commercial app.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/10/2002 8:19:43 PM:Steve K
Awesome Dude. One of the best Treeviews I've seen to date. Your tutorial is great. It shows functionality extremely effectively. Five ++++
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/11/2002 1:11:08 AM:Slider
Steve, Thanks for your comments & vote! Much time has gone into this project & it's great to see the comments and votes - it's what tells me that I have to keep expanding the project with many new features. There are a couple of guys (maybe the same one) that have casted Average votes with no feedback - I've posted them asking why but no response... People, if you find the code useful, needs work, or have ideas that you'd like included, then please let me know!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/12/2002 7:57:03 AM:Andrew
very nice, 5 globes from me
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/12/2002 7:48:42 PM:Slider
Andrew, Thanks for the support!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/16/2002 8:16:35 AM:michael doering
Hello Slider, > what can I say, thanks to share this very cool and useful app.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/19/2002 12:36:17 PM:Phantom Man
Nicely Done! What I Would Like To See Is. When You Scroll The Tree The Picture Stays At It's Same Position. It Gets A Bit Hard On The Eyes When Your Scrolling The Tree And The Picture Is Scrolling As Well. Apart From My Pickiness Very Nicley Done!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/19/2002 4:35:26 PM:Rasputin
Slider, This is one of the best submissions ever offered on PSC - thank you for your generosity in sharing your hard work. I'd give you a 6 globes if it was possible!! Simply excellent! - Ras
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/19/2002 4:43:38 PM:Rasputin
...one last thing. The only thing that can explain votes of less than 5 globes for this is simply JEALOUSY! Just take it as a compliment Slider, and keep up the great work! - Ras
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/19/2002 8:41:54 PM:K0d3r
Th1s 1s th3 m0st awsum th1ng h3r3! Gr3at w0rk Sl1d3r! 10********** if all0w3d!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/20/2002 1:18:27 AM:Bart Goossens
Still the best .... 5 globes
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/26/2002 7:20:08 AM:JohnB
Just what I've been looking for! Thank you from the bottom of my "up 'till 5 a.m." heart! Now my project will be complete!!! :) Thank you again!!!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/30/2002 12:32:50 PM:rufwork
Very nice work. One question -- any chance of getting multiline values (text wrapping that rewraps when the control is resized) displayed in a treeview node? Any pointers for where to look to learn how to add that? Thanks.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/31/2002 10:59:53 PM:Baal
Amazing what you can do with this control - Love yr work! 5*s - Keep it up!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/4/2002 2:14:10 PM:Jason Curns
recieve error during .HookCtrl tvwDialog procedure that it is an invalid control, and that it must be a VB6 Tree View control.. Any Ideas?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/4/2002 2:15:18 PM:Jason Curns
PS, I am using VB 6 SP5
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/5/2002 12:21:46 AM:Slider
Jason, there are a couple of different versions of the MSCOMCTL.OCX file. As minor as they are, it's causing an the problem. Recompile the DLL and the problem will go away.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/29/2002 8:05:18 PM:
wow! great work, i have never seen anything betetr than this one. GReat great great
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/14/2002 2:26:16 PM:
WOW - Great work! Excellent code, for sure, but what makes your project worth MORE than 5 is your willingness to improve it based on feedback from users. Plus, of course, your very noble gesture of letting less-learned programmers (like me) benefit by seeing your work. OUTSTANDING THANK YOU * 100k peace /d
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/14/2002 2:32:18 PM:
One more comment - the sign of a true professional and a really GREAT programmer, is attention to details. Although the animated background is absolutely stunning! But honestly, I found the detail of .Tag that you did NOT overlook, to have been more useful! The M$ treeview uses a string for .Tag, but you fixed their oversight and gave me a variant which is what I needed. peace /d
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/15/2002 11:32:21 PM:Slider
'/d', Thanks for your comments. More features to follow shortly... Stay Tuned!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/18/2002 9:48:46 PM:
nice great
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/20/2002 4:51:11 AM:
Great work. I like see what the possibilites are.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/2/2002 12:55:11 AM:
Slider...Excellent work. I can actually make sense out of this code. You got 5 globes from me....its saving me from 50 cups of coffee and a long frustrating weekend! True Pro. I'll have to send you a copy of the application that I'm using it in...
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/21/2002 4:02:09 AM:
Look very good! But I cannot try it, everytime I open the projects, this or that message comes out. Is there any pre-requisite to install first? I try to recompile the dll, but it gives me error: Missing Microsoft XML V3.0
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/21/2002 5:54:20 AM:Slider
There is a readme. Pls follow the instruction and it should fix the problems that you're experencing.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/21/2002 12:05:41 PM:
Slider : Outstanding!!!!. Thank you
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/24/2002 2:48:15 AM:
Does it work in VBA (Word, Excel. ...) ?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/14/2002 9:22:04 AM:Peter Van der Straeten
Great control, dude. Just a tiny little glitch. You expose in the enum ECodeScrollView a constant named LEFT, this is a VB-Reserved word. It somehow interferes with normal use of vb LEFT function. I can't get my project to compile when i use your DLL. Solved it by renaming LEFT to KLEFT in the ENUM and function that uses the ENUM. Recomend you do the same. scincerely Peter
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/15/2003 4:41:34 AM:Andy Bretl
I have seen some of controls of this kind during my carrer, but none of them was as excellent as this one is. It also finished off some missunderstanding of treeviews that I seem to have (until now...). This piece of work is definitely worth an additional globe (not only 5). Even if I knew somebody who had done that before, I am quite sure he won't simply share it. Very kind ;)..... Seize the Day and keep on going , Andy
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/16/2003 12:29:09 PM:
I read from your answers to the people comments that you have no problem to use it in commercia app. thanks. one more thing I wonder if you can do the treeview to be display in right to left position! it will help a lot. thanx again
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/17/2003 9:16:09 AM:
Man, the world needs more controls like this! Keep up the good work!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/23/2003 8:01:54 PM:
Men! you blew ma mind away, I've been cooking treeview for days now, your code will get my stuff done in minutes. GOD IN HEAVEN WHO IS THE BEST PROGRAMMER EVER WILL BLESS YOU.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/19/2003 5:35:45 PM:
Here is the solution to Left$. Put VBA. infront of it. VBA.Left$. That will solve the conflict with this DLL.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/27/2003 4:55:09 AM:
Real nice piece of code. I was using version 1 for some time, but this is much better. I added some code for showing or not showing checkboxes. If you're interested please mail. Also I had the same problem with Left. I found it better to change the enum to Kleft than to change all the rest of my code.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/31/2003 4:37:07 PM:
When using a pointer icon to show dragging: the icon needs an offset coordinate like x,y of -3, -15 so the point of the pointer is accurate.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/31/2003 4:47:58 PM:
I'd like to drag the node text as well as the node icon. And over lay the NoDrag Icon onto the text when appropriate.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/31/2003 5:01:45 PM:
On a node with children move I was updating my db behind the TreeView with a single sql statement then reloading the entire treeview because the nested node move was just too complex. Your .nodemove mothod looks like I can save some bandwidth and lagtime. Thanks
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/16/2003 6:43:20 AM:
Hi Slider, Thanks, you did a very good job and it was very helpful to my project. Only the ExpandAll function doesn't seem to work quit well / is very slow with big trees. I've build some checks in my program and it seemed as if this method was again and again expanding from the root node. A complete test tree needed only 500 expands, but the ExpandAll method took more then 100.000 expands. I wrote a recursive procedure which did only the necessary expands which was a lot faster (something like 15 seconds for 500 expands). Still with big trees my procedure was very slow too. Do you have any suggestions how I can make an ExpandAll faster? By the way: I use ADO to expand the tree, but the queries took only a fraction of the complete time for expanding. Hope you can say something about this. Kind regards
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/24/2003 6:26:20 PM:
Hi Slider, Any cahnce of you replying to let us know if your still supporting cTreeView? Its been 5 months since you've posted here.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/24/2003 6:56:00 PM:
Oops, sorry about that. A quick search on google led me here: http://www.vbcity.com/forums/to pic.asp?tid=8878&page;=1
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/24/2003 7:12:01 PM:
Hi all, Hoping to get some help on compiling to vbTree.dll. Worked the first few times but now I have some sort of incombatibility. Compiling: DLL : set class Instancing = 5 - MultiUse Have done this but still getting: The xxxx class module was found in the version-compatible component, but not in the project. I click the break compatibility and OK then get: Compile error: Private object modules cannot be used in puclib object modules as parameters or return types for public procedures, as public data members, or as fields of public user defined types I'm sure I've missed something here. Any help from you .dll experts would be greatly appreciated.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/24/2003 7:51:43 PM:
Solved! (The freezing in debug mode was driving me mad. So I had to return to the .Dll) Started from scratch. Downloaded v02.03.00 Downloaded v02.03.01 Modified v02.03.01 with TypeOf changes Copied v02.03.01 cTreeView.cls to v02.03.00 Changed v02.03.00 'Left' and 'Right' to 'Scroll Left' and 'Scroll Right' Recompiled v02.03.00 - Successfull !!!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/1/2003 1:09:35 AM:Thushan Fernando
I found a critical bug, with the drag and drop sample, add two command buttons, in one use Save [XML or Binary] and hte other Load [XML or Binary] run the app, move some nodes around and try and save, close and try loading them, looks like it doesnt save it nicely once its been moved around... any fix?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/1/2003 6:40:12 AM:
Dear Mr. Slider the great job that you did by submit this code for CTreeeView is really somthing great but could you send me the code that close connection then reload the tree? Please Mr. Slider it's important and urgent in fact I use many of your code as parts of my graduation project:) if you do not mind and I have only one week to discus this project so please help me otherwise :( I ll not pass this semster. "Please send on my e-mail :salem_ayed@hotmail.com" with warm regards
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/26/2003 4:16:18 PM:
You did a great and outstanding job on cTreeView. WOW! you are really talented... Keep up the great work.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/7/2003 8:21:11 PM:Slider
Thushan, the problem is solved. I've emailed you the update last month. For everyone else, I'm working on new features for the next release based on what ppl have wanted to see added. If you need this fix urgently, then let me know & I'll email it to you ... Happy coding!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this article has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular article, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | Visual Basic Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.