@@ -7406,30 +7406,27 @@ procedure TVirtualTreeColumns.AdjustAutoSize(CurrentIndex: TColumnIndex; Force:
7406
7406
if (AutoIndex < 0) or (AutoIndex >= Count) then
7407
7407
AutoIndex := Count - 1;
7408
7408
7409
- if AutoIndex >= 0 then
7409
+ with FHeader.Treeview do
7410
7410
begin
7411
- with FHeader.Treeview do
7412
- begin
7413
- if HandleAllocated then
7414
- RestWidth := ClientWidth
7415
- else
7416
- RestWidth := Width;
7417
- end;
7411
+ if HandleAllocated then
7412
+ RestWidth := ClientWidth
7413
+ else
7414
+ RestWidth := Width;
7415
+ end;
7418
7416
7419
- // Go through all columns and calculate the rest space remaining.
7420
- for Index := 0 to Count - 1 do
7421
- if (Index <> AutoIndex) and (coVisible in Items[Index].FOptions) then
7422
- Dec(RestWidth, Items[Index].Width);
7417
+ // Go through all columns and calculate the rest space remaining.
7418
+ for Index := 0 to Count - 1 do
7419
+ if (Index <> AutoIndex) and (coVisible in Items[Index].FOptions) then
7420
+ Dec(RestWidth, Items[Index].Width);
7423
7421
7424
- with Items[AutoIndex] do
7422
+ with Items[AutoIndex] do
7423
+ begin
7424
+ NewValue := Max(MinWidth, Min(MaxWidth, RestWidth));
7425
+ if Force or (FWidth <> NewValue) then
7425
7426
begin
7426
- NewValue := Max(MinWidth, Min(MaxWidth, RestWidth));
7427
- if Force or (FWidth <> NewValue) then
7428
- begin
7429
- FWidth := NewValue;
7430
- UpdatePositions;
7431
- FHeader.Treeview.DoColumnResize(AutoIndex);
7432
- end;
7427
+ FWidth := NewValue;
7428
+ UpdatePositions;
7429
+ FHeader.Treeview.DoColumnResize(AutoIndex);
7433
7430
end;
7434
7431
end;
7435
7432
end;
@@ -31714,6 +31711,8 @@ function TCustomVirtualStringTree.ComputeNodeHeight(Canvas: TCanvas; Node: PVirt
31714
31711
DrawFormat := DrawFormat or DT_LEFT;
31715
31712
DrawText(Canvas.Handle, PChar(S), Length(S), PaintInfo.CellRect, DrawFormat);
31716
31713
Result := PaintInfo.CellRect.Bottom - PaintInfo.CellRect.Top;
31714
+ if toShowHorzGridLines in TreeOptions.PaintOptions then
31715
+ Inc(Result);
31717
31716
end;
31718
31717
31719
31718
//----------------------------------------------------------------------------------------------------------------------
0 commit comments