How do I use TVirtualStringTree to display multi-line items and an "expanded" select item?

I'm trying to create a view similar to the image below (which I know was done using TVirtualStringTree), but I haven't found any code examples on how to achieve this.

Does anyone know how I can have multi-line elements like in the example below and "expand" the select element to show more lines?

alt text

+2


a source to share


2 answers


Please take a look at VT Demos \ Advenced. There you have a demo of Multiline nodes, which I think might be the one you are looking for.

Demo can be found here



Edit: The download page is here and the third item is demos.

+8


a source


I think you have an answer, but I'll give you a couple of tips to put it into practice, because it was a little awkward for me. (At least in Delphi 7)



  • If you do # 13 # 10 for a newline, make sure you have a space after # 10, otherwise you won't get a line break.

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

  • Make VirtualTree.InvalidateNode (Node) then VirtualTree.Refresh tree to get new size for node after caption change.

+6


a source







All Articles