How to use TVirtualStringTree to display multi-line items and “expanded” select item?

StackOverflow https://stackoverflow.com/questions/2848549

  •  27-09-2019
  •  | 
  •  

Question

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

Was it helpful?

Solution

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 here and the third item is the demos.

OTHER TIPS

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.InvalidateNode(Node) then VirtualTree.Refresh the tree to get the new size for the node after you've changed the caption.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top