如何增加报表样式中列表视图的行高?
我需要将 2px :) 添加到列表视图中的行高度(自定义绘制的进度条现在太窄了)。
有两个很好的答案更改列表视图项目高度,http://www.delphipages.com/forum/showthread.php?t=49939,但我做不到。
我知道可以使用图像列表,但我已经有 16x16 图像:)
有人可以帮助我吗? 我会很感激的。
I need to add just 2px :) to a height of a row in a list view (a custom drawn progress bar is too narrow now).
There are two good answers Change Listview item height, http://www.delphipages.com/forum/showthread.php?t=49939, but I couldn't do it.
I know that it is possible to do with an image list, but I have already 16x16 images :)
Can anybody help me?
I'll appreciate it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
响应
CN_MEASUREITEM
控件通知消息,如下:注意:只有当
OwnerDraw
属性为true时才会发送该消息。Respond to the
CN_MEASUREITEM
control notification message, as follows:Note: this message will only be send if the
OwnerDraw
property is true.一个无需编写任何代码的快速而肮脏的替代方案是添加一个 TImageList,将其宽度设置为 1,将其高度设置为您想要的行高,并将其分配给列表视图的 SmallImages。
A quick and dirty alternative without writing any code would be to add a TImageList, set its width to 1 and its height to whatever you want the lines height to be and assign it to the SmallImages of the listview.