Recent

Author Topic: VirtualTreeView vs. TreeListView  (Read 10718 times)

asdf

  • Sr. Member
  • ****
  • Posts: 310
VirtualTreeView vs. TreeListView
« on: February 13, 2011, 12:57:31 am »
Could anybody help comparing them in terms of convenience ?
Which is better for using in commercial project ?
« Last Edit: February 13, 2011, 01:11:40 am by asdf »
Lazarus 1.2.4 / Win 32 / THAILAND

asdf

  • Sr. Member
  • ****
  • Posts: 310
Re: VirtualTreeView vs. TreeListView
« Reply #1 on: February 24, 2011, 05:17:35 pm »
Finally I just moved to use TreeListView instead.
It looks easier and I could finish learning/practicing the example within 1 hour.
Lazarus 1.2.4 / Win 32 / THAILAND

JD

  • Hero Member
  • *****
  • Posts: 1905
Re: VirtualTreeView vs. TreeListView
« Reply #2 on: February 26, 2011, 05:55:12 pm »
Finally I just moved to use TreeListView instead.
It looks easier and I could finish learning/practicing the example within 1 hour.

VirtualTreeView takes a while to get used to but the rewards come must later. In my opinion it is faster & more adaptable than TreeListView. Take a look at the demos for VirtualTreeView. It is a very impressive control.
Linux Mint - Lazarus 4.0/FPC 3.2.2,
Windows - Lazarus 4.0/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

rajivsoft

  • New Member
  • *
  • Posts: 48
Re: VirtualTreeView vs. TreeListView
« Reply #3 on: March 02, 2011, 02:26:04 pm »
Finally I just moved to use TreeListView instead.
It looks easier and I could finish learning/practicing the example within 1 hour.

VirtualTreeView takes a while to get used to but the rewards come must later. In my opinion it is faster & more adaptable than TreeListView. Take a look at the demos for VirtualTreeView. It is a very impressive control.
yes, it's a bit hard to understand in all it's complicity, but when you know how to use it it replace both treeview and treelistview and practically all other list components because of huge customization.

asdf

  • Sr. Member
  • ****
  • Posts: 310
Re: VirtualTreeView vs. TreeListView
« Reply #4 on: March 02, 2011, 03:17:37 pm »
TreeListView made me feel like using StringGrid

To add column :  TreeListView1.Columns.add.Text:='Column 1';
To add a node :  TreeListView1.Items.Add.Text:='1150 Machinery';
To add a child :  TreeListView1.SubItems.Add('Year 2011');

Before that I have spent over 2 weeks to learn using VirtualTreeView and I could only get 'columns'. The demo is very difficult.

Are there any simple codes like this to learn VirtualTreeView ?
Somebody please help.
I think there are a lot of our members need it.
« Last Edit: March 02, 2011, 03:21:21 pm by asdf »
Lazarus 1.2.4 / Win 32 / THAILAND

eny

  • Hero Member
  • *****
  • Posts: 1646
Re: VirtualTreeView vs. TreeListView
« Reply #5 on: March 02, 2011, 05:04:38 pm »
yes, it's a bit hard to understand in all it's complicity, but when you know how to use it it replace both treeview and treelistview and practically all other list components because of huge customization.
Agreed you have full control over every aspect of the view (fonts, icons, colors, contents, in-place editors etc.) but managing all that is a lot of work and VT tightly couples domain data and UI elements. Making it very hard to create re-usable code (I've had to build a Mediator class to manage this).

For simple lists I would not recommend using it.
All posts based on: Win10 (Win64); Lazarus 3_4  (x64) 25-05-2024 (unless specified otherwise...)

JD

  • Hero Member
  • *****
  • Posts: 1905
Re: VirtualTreeView vs. TreeListView
« Reply #6 on: March 02, 2011, 05:32:37 pm »
yes, it's a bit hard to understand in all it's complicity, but when you know how to use it it replace both treeview and treelistview and practically all other list components because of huge customization.
Agreed you have full control over every aspect of the view (fonts, icons, colors, contents, in-place editors etc.) but managing all that is a lot of work and VT tightly couples domain data and UI elements. Making it very hard to create re-usable code (I've had to build a Mediator class to manage this).

For simple lists I would not recommend using it.

That's quite true & I agree with you that it is an overkill for simple lists. VTV is for "heavy lifting".

VirtualTreeView Gallery
http://www.soft-gems.net/index.php?option=com_content&task=view&id=16&Itemid=33
Linux Mint - Lazarus 4.0/FPC 3.2.2,
Windows - Lazarus 4.0/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

IPguy

  • Sr. Member
  • ****
  • Posts: 385
Re: VirtualTreeView vs. TreeListView
« Reply #7 on: March 02, 2011, 07:04:28 pm »
I started by walking through the basic VTV demo on the Lazarus wiki site, then extending that to all my 13 columns and adding more and more functionality.  (next: need to figure out how to implement different pick lists for three of the columns.)

It would be very nice if there was a collection of tips & tricks for VTV in one central location.  I've spent a lot of time searching for solutions that turned out to be very simple.  I've also spent a lot of time in the virtualstring.pas file, trying to figure out what the various options do and what the various functions really do.  The documentation does not provide a good "user manual" approach to using vtv.

I've found the Lazarus portion of my application to be fairly simple compared to the VTV portion of my app.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2645
Re: VirtualTreeView vs. TreeListView
« Reply #8 on: March 03, 2011, 01:30:53 am »
yes, it's a bit hard to understand in all it's complicity, but when you know how to use it it replace both treeview and treelistview and practically all other list components because of huge customization.
Agreed you have full control over every aspect of the view (fonts, icons, colors, contents, in-place editors etc.) but managing all that is a lot of work and VT tightly couples domain data and UI elements. Making it very hard to create re-usable code (I've had to build a Mediator class to manage this).

For simple lists I would not recommend using it.

For simple lists, you probably have your data to display somewhere, set VT.RootNodeCount := YourDataList.Count and implement VT.OnGetText
Thats all.

OK, a TListview / TListbox is similar, bet then you have your data in 2 places.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

 

TinyPortal © 2005-2018