How to enable checkboxes in Virtual TreeView columns headers?
-
05-07-2021 - |
Вопрос
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?
Решение
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.
Не связан с StackOverflow