How to make a selection over a large area of cells in virtualtreeview?
Asked Answered
D

1

9

I am using TVirtualTreeView as an excellent alternative to the old TStringgrid.

On one feature that I am missing though, is the possibility to make selections of an any area of cells (other than a single column, row or the whole area).

I can not find any solution to this, does anyone have a suggestion?

Dunagan answered 7/12, 2011 at 13:33 Comment(5)
You can set the selected[] property for each and every Node (row). In the Header can you set which columns are selected. Set Multiselect to true in the options.Dimarco
I have tried, but I can not select multiple columns. There is no options in TVirtualTreeColumn.Option or in TVirtualTreeColumns.Dunagan
There is no such feature in VT. But you can handle this by your own in your data structure (e.g. as a bit mask, where each bit will represent one column and state if it's selected or not). And this mask you can change in a certain column click event and draw it in a some cell draw event.Gorgonian
Thanks! i have thought of the same solution too, but right now I havn't the time on my current project. It would be interesting if anyone already has made the implementation in a component of their own. What made me curious is the feature to mark an area with the mouse pressed down - There will be a blue (transparent) rectangle over the cells but for what reason? If I take the time to implement a selection treeview I will put up the code for review..Dunagan
How about #491698?Belongings
S
0

You Can Use Canvas Draw For Show Own Selection Area of Cell.

Salverform answered 28/5, 2012 at 14:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.