Compact long string with PathEllipsis in .Net

218 Views Asked by At

I have following string, which i am drawing in one of my treeview control using DrawString.

@haTEST sadasd asd asd asd asd asd asd asd ### adssad asd asd asd asd asd asdasdasd

The treeview is drawing the above string like following:

enter image description here

Now,i want to compact the same string shown in above image to another string. I have tried http://www.codeproject.com/KB/vb/NewPathCompactPath.aspx

but, it didn't provide me the above image result.

Please let me know, how to get the same result using TextRenderer.MeasureText for same string.

Thanks

0

There are 0 best solutions below