@@ -10488,6 +10488,9 @@ function TVTHeader.HandleMessage(var Message: TLMessage): Boolean;
10488
10488
with TLMLButtonDblClk(Message) do
10489
10489
P := Point(XPos, YPos);
10490
10490
10491
+ IsInHeader := InHeader(P);
10492
+ Result := IsInHeader;
10493
+
10491
10494
if (hoHeightDblClickResize in FOptions) and InHeaderSplitterArea(P) and (FDefaultHeight > 0) then
10492
10495
begin
10493
10496
if DoHeightDblClickResize(P, GetShiftState) and (FDefaultHeight > 0) then
@@ -10504,7 +10507,7 @@ function TVTHeader.HandleMessage(var Message: TLMessage): Boolean;
10504
10507
Message.Result := 0;
10505
10508
Result := True;
10506
10509
end
10507
- else if InHeader(P) and (Message.Msg <> LM_LBUTTONDBLCLK) then
10510
+ else if IsInHeader and (Message.Msg <> LM_LBUTTONDBLCLK) then
10508
10511
begin
10509
10512
case Message.Msg of
10510
10513
LM_MBUTTONDBLCLK:
@@ -10587,9 +10590,9 @@ function TVTHeader.HandleMessage(var Message: TLMessage): Boolean;
10587
10590
// Disabled columns do not start a drag operation because they can't be clicked.
10588
10591
Include(FStates, hsDragPending);
10589
10592
SetCapture(Treeview.Handle);
10590
- Result := True;
10591
10593
Message.Result := 0;
10592
10594
end;
10595
+ Result := True;
10593
10596
end;
10594
10597
10595
10598
// This is a good opportunity to notify the application.
@@ -25210,9 +25213,11 @@ procedure TBaseVirtualTree.WndProc(var Message: TLMessage);
25210
25213
//lclheader
25211
25214
//let the header handle the message here
25212
25215
//otherwise no header click event will be fired
25213
- FHeader.HandleMessage(Message);
25214
- ControlState := ControlState + [csLButtonDown];
25215
- Dispatch(Message); // overrides TControl's BeginDrag
25216
+ if not FHeader.HandleMessage(Message) then
25217
+ begin
25218
+ ControlState := ControlState + [csLButtonDown];
25219
+ Dispatch(Message); // overrides TControl's BeginDrag
25220
+ end;
25216
25221
end;
25217
25222
end;
25218
25223
end;
0 commit comments