开发者

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

I'm looking to create a look similar to the image below (which I know was done using TVirtualSt开发者_StackOverflow中文版ringTree), 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?

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


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜