.Net 中使用 PathEllipsis 压缩长字符串
我有以下字符串,我正在使用 DrawString 在我的树视图控件之一中绘制该字符串。
@haTEST sadasd asd asd asd asd asd asd asd ### adssad asd asd asd asd asd asdasdasd
树视图正在绘制上面的字符串,如下所示:
现在,我想压缩上面显示的相同字符串图像到另一个字符串。 我已经尝试过 http://www.codeproject.com/KB/vb/NewPathCompactPath.aspx
但是,它没有为我提供上面的图像结果。
请让我知道如何使用 TextRenderer.MeasureText
对于相同的字符串获得相同的结果。
谢谢
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:
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论