VirtualTreeView vs. TreeListView lazarus / 31-LCL ---------------------------------------------------------------------- asdf · 2011-02-12 23:57 Could anybody help comparing them in terms of convenience ? Which is better for using in commercial project ? ---------------------------------------------------------------------- asdf · 2011-02-24 16:17 Finally I just moved to use TreeListView instead. It looks easier and I could finish learning/practicing the example within 1 hour. ---------------------------------------------------------------------- JD · 2011-02-26 16:55 Quote from: asdf on February 24, 2011, 05:17:35 pmFinally 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. ---------------------------------------------------------------------- rajivsoft · 2011-03-02 13:26 Quote from: JD on February 26, 2011, 05:55:12 pmQuote from: asdf on February 24, 2011, 05:17:35 pmFinally 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 · 2011-03-02 14:17 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. ---------------------------------------------------------------------- eny · 2011-03-02 16:04 Quote from: rajivsoft on March 02, 2011, 02:26:04 pmyes, 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. ---------------------------------------------------------------------- JD · 2011-03-02 16:32 Quote from: eny on March 02, 2011, 05:04:38 pmQuote from: rajivsoft on March 02, 2011, 02:26:04 pmyes, 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 ---------------------------------------------------------------------- IPguy · 2011-03-02 18:04 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 · 2011-03-03 00:30 Quote from: eny on March 02, 2011, 05:04:38 pmQuote from: rajivsoft on March 02, 2011, 02:26:04 pmyes, 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.