Question

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?

enter image description here

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top