Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Delphi XE2 中使用 Virtual TreeView V5.0.1(2012 年 9 月 6 日)。在标题列属性上设置CheckBox := True不会启用复选框,所以这里有一个问题,如何在列标题上启用复选框?
CheckBox := True
这个看似简单的问题的答案带来了十几个谷歌结果,这些结果试图破解标题绘图OwnerDraw并手动绘制复选框。
OwnerDraw
我要分享的解决方案在哪里很简单,在IDE中启用以下两项:include hoShowImagesinto VirtualTree.Header.Optionsset 和toCheckSupportinto VirtualTree.TreeOptions.MiscOptionsset。
hoShowImages
VirtualTree.Header.Options
toCheckSupport
VirtualTree.TreeOptions.MiscOptions
然后您可以启用Header.Column[0].CheckBox属性并查看所需的结果。
Header.Column[0].CheckBox