简体   繁体   English

向 Win32 ListView 添加填充

[英]Adding Padding to Win32 ListView

I have a ListView in LVS_REPORT mode that contains rows of strings.我有一个LVS_REPORT模式的 ListView,其中包含多行字符串。 Everything draws properly;一切都正确绘制; however, I noticed that all of the rows are very densely packed.但是,我注意到所有的行都非常密集。

Is there anyway to simply add padding to the ListView items?有没有办法简单地向 ListView 项目添加填充? I imagine that you could do BS_OWNERDRAW ;我想你可以做BS_OWNERDRAW however, I don't really want to go so extreme if there is just a really simple solution that I'm missing.但是,如果我缺少一个非常简单的解决方案,我真的不想 go 如此极端。

so what I ended up doing in order to add some space between each element is essentially create a blank ListView item between each real one.所以我最终为了在每个元素之间添加一些空间而做的实际上是在每个真实元素之间创建一个空白ListView项目。 I don't know if this is the best way to go about it, but it seems to work so far.我不知道这是否是 go 关于它的最佳方式,但到目前为止它似乎有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM