TVirtualStringTree中的自动调整列 [英] Auto sizing column in TVirtualStringTree

查看:306
本文介绍了TVirtualStringTree中的自动调整列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

爬上TVirtualTreeView的学习山,我试图创建一个自定义后代,确保当控件调整大小时,最后一列的宽度完全填充控件的宽度,而不需要水平滚动条。

Climbing the learning mountain of TVirtualTreeView, I'm attempting to create a custom descendant that ensures that, when the control is resized, the width of the last column exactly fills control's width without requiring a horizontal scroll bar.

我看到一些与AutoFitColumns相关的项目(一种方法和一些事件),但不包含此功能的文档。我可以使用AutoFitColumn来自动调整我的最后一列,如果是这样,那么如何。

I see a number of items (a method and a number of events) pertaining to "AutoFitColumns", but not documentation covering this feature. Can I use AutoFitColumns to automatically resize my last column and if so, how.

推荐答案

使用你的virtualtreeview, ....

With your virtualtreeview, and a couple headers visible....

在delphi对象检查器中选择virtualtreeview | Header,并将AutoSizeIndex设置为最后一列的索引。

Select the "virtualtreeview | Header" in the delphi object inspector and Set the AutoSizeIndex to the the index of your last column.

现在选择virtualtreeview |标题|选项,并确保hoAutoResize为TRUE。

Now select "virtualtreeview | Header | Options" and make sure hoAutoResize is TRUE.

希望这有助于

这篇关于TVirtualStringTree中的自动调整列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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