Forum > LCL

VirtualTreeView vs. TreeListView

<< < (2/2)

eny:

--- Quote from: rajivsoft on March 02, 2011, 02:26:04 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.

--- End quote ---
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:

--- Quote from: eny on March 02, 2011, 05:04:38 pm ---
--- Quote from: rajivsoft on March 02, 2011, 02:26:04 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.

--- End quote ---
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.

--- End quote ---

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:
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:

--- Quote from: eny on March 02, 2011, 05:04:38 pm ---
--- Quote from: rajivsoft on March 02, 2011, 02:26:04 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.

--- End quote ---
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.

--- End quote ---

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.

Navigation

[0] Message Index

[*] Previous page

Go to full version