0

I have Created a TTreeView in Delphi 5. In this TreeView if any Node has more than 256 characters then the characters after the 256th position become unreadable (those characters after the 256th position turns to Chinese).

Here is the Image of the TreeView

What is the cause for this behaviour and is there any other control that is available in Delphi 5 that i can use to build the Tree Structure.

Arioch 'The
  • 15,799
  • 35
  • 62
vikas
  • 1
  • 3
    I don't think that it's important to search for the reason here (maybe short string was used somewhere). Tree view control will display at most 260 chars (which is [limited by the system](https://msdn.microsoft.com/en-us/library/windows/desktop/bb773456(v=vs.85).aspx)). So, if you won't be drawing items by yourself, you will see at most 4 more chars after resolving this problem. About an alternative, I'd suggest VirtualTreeView ([older version was compatible](https://stackoverflow.com/a/2551349/8041231) with your ancient Delphi). – Victoria Oct 11 '17 at 07:01
  • @Victoria Soft gems also had TTreeViewNT or something enhanced system TreeView, maybe it would help. In theory, owner-measure-draw tree may have any length leafs. Though it will not fix speed limitations and rest, it would be easier to migrate to, if it would be enough. VTV is great, but it is a radical departure. Sometimes it is just way TOO great :-D – Arioch 'The Oct 11 '17 at 12:50
  • I wonder, maybe you are attempting to use a `TTreeView` for something it isn't designed for. So please explain why you want to have more than 255 characters in the `TTreeViewItem`? – Tom Brunberg Oct 11 '17 at 16:53

0 Answers0