views:

436

answers:

2

I'm looking to create a look similar to the image below (which I know was done using TVirtualStringTree), but I haven't found any example code on how to accomplish this.

Anyone knows how I can have multi-line items like on the example below, and "expand" the select item to show more lines?

alt text

+6  A: 

Please take a look at VT Demos\Advenced. In there you have a Multiline nodes demo which I guess might be the thing you are looking for.

Demos can be found here

Edit:
The download page is:
http://www.soft-gems.net/index.php?option=com_content&task=view&id=30&Itemid=35
and the third item is the demos.

Wodzu
@Wodzu. I personally don't like when a link tries to download something directly, especially when the URL is not explicit about the content. I added the download page link as a more candid reference.
François
@François, you have right. Thanks for the correction.
Wodzu
+1  A: 

I guess you've got an answer, but I'll give you a couple hints for putting this into practice because it's been a little wonky for me. (At least in Delphi 7)

  1. If you do a #13#10 for a new line make sure you've got a space after the the #10, otherwise you will not get a line break.

  2. VirtualTree.MultiLine[node] := true will allow multi line, but not necessarily make it multiline.

  3. Do VirtualTree.Invalidate[Node] then refresh the tree to get the new size for the node after you've changed the caption.

Peter Turner