I'm using Virtual TreeView V5.0.1 (06 Sep 2012) in Delphi XE2. Setting CheckBox := True
on a header column property does not enables the checkbox, so here's the question, how do I enable checkboxes on column headers?
Asked
Active
Viewed 4,618 times
5

Kromster
- 7,181
- 7
- 63
- 111
1 Answers
7
The answer to this seemingly simple question brought a dozen of Google results that tried to hack the header drawing through OwnerDraw
and painting checkboxes manually.
Where's the solution I want to share is quite simple, enable following two items in IDE:
include hoShowImages
into VirtualTree.Header.Options
set and toCheckSupport
into VirtualTree.TreeOptions.MiscOptions
set.
Then you can enable Header.Column[0].CheckBox
property and see desired result.

Kromster
- 7,181
- 7
- 63
- 111
-
2Also, if you want to use the checkbox, say to select all items in a list, it goes under the header's OnClick. – Aaron Jun 26 '13 at 17:46