如何在TTreeview中剪辑文本 [英] How to Clip Text in a TTreeview

查看:56
本文介绍了如何在TTreeview中剪辑文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果名称"列太窄,Delphi IDE Locals窗口会裁剪局部变量的名称,如下所示:

The Delphi IDE Locals window clips the names of the local variables if the Name column is too narrow like this:

我想在程序中做同样的事情.目前,我正在使用TMS THTMLTreeList,得到的结果如下所示:

I would like to do the same thing in my program. At present I am using a TMS THTMLTreeList and the results I am getting look like this:

是否可以像IDE一样剪切文本?

Is it possible to clip the text like the IDE does?

感谢您的帮助!

推荐答案

我不知道如何使用TMS树形视图进行操作,但是对于标准的TTreeView,您将不得不手动绘制文本,然后就可以剪它,但你想要的.我现在忘记了它的名称,但是RTL确实具有将文本绘制到TCanvas上的功能,该功能具有用户指定的剪切宽度,可以为您绘制椭圆.

I don't know how to do it with a TMS treeview, but for the standard TTreeView you would have to owner-draw the text manually, then you can clip it however you want. I forget the name of it right now, but the RTL does have a function that draws text onto a TCanvas with a user-specified clipping width that draws the ellipses for you.

这篇关于如何在TTreeview中剪辑文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆