如何仅在特定列中使用CheckBox设置TListView? [英] How can I setup TListView with CheckBoxes in only certain columns?

查看:479
本文介绍了如何仅在特定列中使用CheckBox设置TListView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是Delphi 2010,我试图允许用户在TListView中的每行两个选项之间进行选择。使用TListView,我可以将样式设置为vsReport并启用复选框,但这只能让我每行1个复选框。我需要的是每行2个复选框...具体为1列,第1列为1,第2列为1。

I'm using Delphi 2010, and I am trying to allow the user to select between 2 options per row in a TListView. With TListView, I can set the style to vsReport and enable Checkboxes, but that only gets me 1 checkbox per row. What I need is 2 checkboxes per row...specifically 1 for the 1st column and 1 for the 2nd column.

我要完成的是非常类似于标准Windows文件安全对话框:

What I am trying to accomplish is very similar to the standard Windows file security dialog:

有没有人有任何建议来实现这样的使用TListView,甚至MustangPeak的 TEasyListView

Does anyone have any suggestions for implementing something like this using TListView or even MustangPeak's TEasyListView?

推荐答案

看看这个
如何在Delphi中设置一个复选框TStringGrid?

更新
链接显示如何绘制复选框。您可以使用TListView.OnCustomDrawItem和/或OnCustomDrawSubItem事件

update The link shows how to draw checkboxes. You can do the same using TListView.OnCustomDrawItem and/or OnCustomDrawSubItem events

这篇关于如何仅在特定列中使用CheckBox设置TListView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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