benibela / treelistview

A Pascal treelistview component, showing a treeview together with the columns of a listview (for Delphi and Lazarus)
52 stars 18 forks source link

how to add Checkboxes in TreeListView? #2

Open hydexon opened 3 years ago

hydexon commented 3 years ago

There's some sort way to put native checkboxes in an single column of TreeListView records?, i'm not needing the use of the tree structure, but mostly ListView, because this control gives the exact amount of stock customization i need, but i can't find any way to add checkboxes in an column.

Thanks.

benibela commented 3 years ago

You can place native controls in it. Here I place a TEdit in a cell, so it can be edited. getBounds returns the appropiate place

The problem is the scrolling, you need to update the positions when someone scrolls, since it uses TScrollBar not a TScrolBox. And if you update the positions it might trigger unnecessary repaints which could cause it to flicker...

I also have been using it with non native checkboxes: grafik

hydexon commented 2 years ago

Sorry for reply, THIS LATE, but your solution worked for me and it's better, just a final reply, there's a way also to put progress bar in a record item?, use the record item .text property as the progressbar progress value?

benibela commented 2 years ago

You can use the CustomRecordItemDraw event to draw a progress bar.