We have implementation that uses OnCustomDrawItemEvent of treeview to draw items.
NodeRect := Node.DisplayRect(true);
TextRect(NodeRect,NodeRect.Left, NodeRect.Top, sometext);
The issue is that some text is bigger than the width of TreeView, i can identify it with TextWidth(someText) but can`t find a way to enlarge it and display horizontal scrollbar.
Any suggestions?
Unfortunately, the only way to tell the TreeView how much spacing it needs to calculate its horizontal scrollbar is to put real text of sufficient length into your nodes. Simply drawing on top of the nodes is not enough if they don't have actual text assigned to them.