Is there an event notifying about the VirtualTreeView header column check box click? It is the check box highlighted on this picture:
Write a handler for the OnHeaderClick
event and check if the HitPosition
property of the HitInfo
parameter contains the hhiOnCheckbox
flag. For example:
procedure TForm1.VirtualTreeHeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
begin
if hhiOnCheckbox in HitInfo.HitPosition then
begin
if Sender.Columns[HitInfo.Column].CheckState = csCheckedNormal then
ShowMessage('Checked!')
else
ShowMessage('Unchecked!')
end;
end;