4

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.

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

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

stukelly
  • 4,257
  • 3
  • 37
  • 44
Mick
  • 13,248
  • 9
  • 69
  • 119

2 Answers2

9

Take a look at this Put a TCheckBox inside a TStringGrid in Delphi

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

Community
  • 1
  • 1
Roman Yankovsky
  • 1,207
  • 11
  • 23
2

I use my own modified version of ExGridView by Roman Mochalov, and full sources for my modified version, plus a demo here (open the Demo in the Demo2 folder) showing checkboxes.

enter image description here

Warren P
  • 65,725
  • 40
  • 181
  • 316