开发者

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

开发者 https://www.devze.com 2022-12-30 07:24 出处:网络
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.

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

精彩评论

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

关注公众号