如何仅在特定列中使用CheckBox设置TListView?

编程入门 行业动态 更新时间:2024-10-10 21:26:26
本文介绍了如何仅在特定列中使用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?

本文发布于:2023-11-24 11:48:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1625084.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:在特定   CheckBox   TListView

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!