-
Feb 19th, 2013, 01:58 PM
#1
Pure VB6 TreeView Control
....or ListView if you set the 'Indentation' Property to zero.... ;-)
Why I created this:
I am developing a treeview control BUT this isn't it!
At this stage, I am just creating the classes that will provide the 'engine' for my final work. However, in the course of doing so, I knocked up a very basic VB6 User Control and a hosting form in order to test them. I do not intend to use this Control myself (I'll be writing a new one that draws the nodes and provides for 'proper' hit-tests etc) so may not develop it further unless I need to add functionality to the classes that I need to test. Therefore there may or may not be updates to this post. However, somebody might find it useful to learn from in its current state...
I'd also appreciate peer code review as I'm a self-taught coder and may be doing some things less efficiently than I could be (or making other glaring mistakes)!
FEATURES:
- Drag-And-Drop between nodes
- User-definable node caption colours
- User-definable Background colour or picture
WATCH OUT FOR:
- Barely any error handlers added as yet (cos I want to expose all errors during testing)
- Not extensively commented (since I'm re-writing, re-designing as I go along)
Please do not report errors/crashes with the demo form - it is just a demo. I am however interested in errors raised by the classes and, to a lesser extent, the User Control. I'll repeat; it's really the classes that I am submitting - the rest is just a way of demonstrating/testing them...
Tree.zip
If you don't know where you're going, any road will take you there...
My VB6 love-children: Vee-Hive and Vee-Launcher
-
Mar 19th, 2013, 05:21 PM
#2
Re: Pure VB6 TreeView Control
I don't know if anybody is interested (since nobody has posted here), but recently I resumed work on my Tree control, making some fairly significant changes in the following areas:
- GRAPHICS
Everything is 100% flicker-free and now drawn in 32bit graphics (i.e. an alpha channel is supported). This has been achieved via a reference to vbrichclient4.dll, which is all I use these days when I want nice images and controls (knocks spots off GDI IMHO). As a result, the tree icons are no longer constrained to what can be achieved via the intrinsic VB ImageList control so they, too, can look as nice as you like.
- DESIGN
I've introduced the concept of Node types to the tree's design. This means that, when populating a tree, you first define the node types and then start adding nodes of a type; i.e. .Nodes.Add ParentKey, Key, Caption, Type
The advantage of this is that when defining a Node Type, you can specify some rules for that type such as whether it is a valid drop target, a valid drag source, and whether these are valid for internal (i.e. Node to node drag/dropping), external (i.e. from other controls) or both. Hope that makes sense. It basically means that you don't have to code as many drag/drop rules when using the control.
Besides this, there are a few new properties added to the test harness (i.e. the form) that you can play with.
Shout here if you want to see an update in this thread but be aware that you will need to get hold of vbrichclient4.dll as it now has this dependency.
If you don't know where you're going, any road will take you there...
My VB6 love-children: Vee-Hive and Vee-Launcher
-
Mar 20th, 2013, 08:41 PM
#3
Re: Pure VB6 TreeView Control
You really put a lot of effort into this. I am really impressed. The animation effect is especially appealing. I wish I ran into this when I was still using VB6. I'd have definitely had uses for it.
Top quality work man....Good job!
-
Mar 21st, 2013, 01:07 AM
#4
Re: Pure VB6 TreeView Control
Thanks Niya - that is very pleasing to hear. This control is now waaaaay better than the OP and will improve even more, I'm sure (loving Cairo drawing provided by vbrichclient4). But the fact that you took the time to comment even though my work is of no use to you is even more pleasing and I'm gonna bump your rep purely because of that communal spirit :-)
EDIT: Meant to mention for the benefit of others:
Now supports different sort methods per Node Type: 'No Sort', 'Sort by Caption', 'Sort by Type then Caption' (will add others). Control is updated automatically when properties are changed...
Last edited by ColinE66; Mar 21st, 2013 at 01:17 AM.
If you don't know where you're going, any road will take you there...
My VB6 love-children: Vee-Hive and Vee-Launcher
-
Mar 27th, 2013, 10:10 AM
#5
Re: Pure VB6 TreeView Control
Great jerb! Definitely quality code. Hope you make some more UserControls and submit them here.
-
Mar 27th, 2013, 04:22 PM
#6
Lively Member
Re: Pure VB6 TreeView Control
good work bro,if you add unicode support in tree node then it will be more helpful,God bless you
reply on various posts make you a power poster,may not being u a helpful poster,if u dn't understand how u help then dn't need to reply,it increases ur post count,but decreases ur worthness
-
Mar 27th, 2013, 07:00 PM
#7
Re: Pure VB6 TreeView Control
The latest version does support unicode - but not the one in Post #1
If you don't know where you're going, any road will take you there...
My VB6 love-children: Vee-Hive and Vee-Launcher
-
Apr 19th, 2013, 02:28 PM
#8
Junior Member
Re: Pure VB6 TreeView Control
-
Apr 20th, 2013, 07:12 PM
#9
Re: Pure VB6 TreeView Control
What, in a demo? Did you actually read the first post?
If you don't know where you're going, any road will take you there...
My VB6 love-children: Vee-Hive and Vee-Launcher
-
Apr 20th, 2013, 08:28 PM
#10
Junior Member
Re: Pure VB6 TreeView Control
Originally Posted by ColinE66
What, in a demo? Did you actually read the first post?
Yes I did and thank you for turning me on to Olaf's (http://www.vbrichclient.com/#/en/About/) work.
I was just trying to find out if there was a property lurking somewhere that would enable checkboxes that I may have missed.
Thanks
-
Apr 22nd, 2013, 10:14 AM
#11
Re: Pure VB6 TreeView Control
No, there is no property. In my demo you could add checkbox controls to achieve that effect but, since you are more interested in the Cairo stuff, the answer is that you would need to create them yourself, as Cairo widgets...
If you don't know where you're going, any road will take you there...
My VB6 love-children: Vee-Hive and Vee-Launcher
-
Oct 20th, 2016, 11:38 AM
#12
New Member
Re: Pure VB6 TreeView Control
Hello,
I understand it is too late, but is the treeview control with unicode support available for download?
Please advise.
Thanks.
-
Oct 20th, 2016, 06:34 PM
#13
Addicted Member
Re: Pure VB6 TreeView Control
Why don't you support the mouse scrolling
-
Oct 21st, 2016, 02:31 AM
#14
Re: Pure VB6 TreeView Control
It's a demo, not a full blown control...
And the source code is available, so you can enhance it like you want.
-
Oct 21st, 2016, 02:43 AM
#15
New Member
Re: Pure VB6 TreeView Control
Originally Posted by Arnoutdv
It's a demo, not a full blown control...
And the source code is available, so you can enhance it like you want.
Thanks for the reply.
I understand its a demo. In the source code, replacing intrinsic label control with UniLabel, we get the unicode support.
Since the author has mentioned that the unicode support is added, I preferred to check his implementation.
-
Oct 21st, 2016, 03:05 AM
#16
Re: Pure VB6 TreeView Control
No problem, my reply was targeted at ChenLin ...
-
Oct 21st, 2016, 10:23 AM
#17
Lively Member
Re: Pure VB6 TreeView Control
Great !
Congratulations.
Please go on in that way to implement checkbox, multiselect, and others...
Regards
-
May 14th, 2018, 11:16 PM
#18
Re: Pure VB6 TreeView Control
Originally Posted by ColinE66
The latest version does support unicode - but not the one in Post #1
Is there a 'later version' download link on this page, that I cannot see ?
Or is the download in post 1, the latest ?
Thanks,
Rob
-
May 15th, 2018, 03:13 AM
#19
Re: Pure VB6 TreeView Control
Hi bobbles,
The only version that has been maintained has a dependency on Olaf's RC5. If you are interested in that, I can submit it in a new Code Bank thread.
If you don't know where you're going, any road will take you there...
My VB6 love-children: Vee-Hive and Vee-Launcher
-
May 15th, 2018, 05:10 AM
#20
Re: Pure VB6 TreeView Control
Originally Posted by ColinE66
Hi bobbles,
The only version that has been maintained has a dependency on Olaf's RC5. If you are interested in that, I can submit it in a new Code Bank thread.
Colin,
I do all my VB6 development in my XP PC.
I believe I recall that Olaf's contributions usually need Vista or more recent.
If my memory is correct (won't work in XP) then don't go to that trouble for me.
Thanks for the offer though,
Rob
-
May 15th, 2018, 05:36 AM
#21
Re: Pure VB6 TreeView Control
@Colin: Can you please upload it for the rest of us that believe most of RC5 works on XP and the parts that don't are obscure enough to not care that much about. . .
cheers,
</wqw>
-
May 15th, 2018, 07:33 AM
#22
Re: Pure VB6 TreeView Control
OK. I've been a bit lazy with it recently in terms of the way it's integrated into my main app so I'll need a little time to de-couple it back into something more stand-alone. Gimme a few days...
If you don't know where you're going, any road will take you there...
My VB6 love-children: Vee-Hive and Vee-Launcher
-
May 15th, 2018, 09:01 AM
#23
Re: Pure VB6 TreeView Control
Originally Posted by Bobbles
Colin,
I do all my VB6 development in my XP PC.
I believe I recall that Olaf's contributions usually need Vista or more recent.
If my memory is correct (won't work in XP) then don't go to that trouble for me.
Thanks for the offer though,
Rob
Hi Bobbles, all my VB6 development is also in XP PC, and all my software runs on XP, Vista, Win7, Win8 and Win10. If you don't use CoreAudio, RC5 works without any problems on XP. The compatibility of RC5 is excellent.
Last edited by dreammanor; May 15th, 2018 at 09:50 AM.
-
May 20th, 2018, 12:36 PM
#24
Re: Pure VB6 TreeView Control
If you don't know where you're going, any road will take you there...
My VB6 love-children: Vee-Hive and Vee-Launcher
-
Apr 21st, 2021, 12:57 AM
#25
Member
Re: Pure VB6 TreeView Control
Great job, but it looks like it doesn't have the checkbox property.
-
Apr 21st, 2021, 03:28 AM
#26
Re: Pure VB6 TreeView Control
If you had read the rest of the thread you would have seen that checkboxes are not implemented.
The latest version can be found here:
https://www.vbforums.com/showthread....t-RAD-TreeView
And I believe it doesn't have checkboxes either.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|