1
1
unit VirtualTrees;
2
2
3
- // Version 4.8.6
3
+ // Version 4.8.7
4
4
//
5
5
// The contents of this file are subject to the Mozilla Public License
6
6
// Version 1.1 (the "License"); you may not use this file except in compliance
24
24
// (C) 1999-2001 digital publishing AG. All Rights Reserved.
25
25
//----------------------------------------------------------------------------------------------------------------------
26
26
//
27
+ // April 2010
28
+ // - Bug fix: Removed active column changing from TBaseVirtualTree.WMKeyDown to re-gain standard conforming
29
+ // behaviour for VK_NEXT and VK_PRIOR
30
+ // - Bug fix: Paint option toUseExplorerTheme works properly without defining columns
31
+ // - Bug fix: TBaseVirtualTree.PrepareBitmaps now correctly closes the theme handle
27
32
// January 2010
28
33
// - Bug fix: TBaseVirtualTree.AdjustTotalHeight now longer calculates wrong total heights if nodes have been
29
34
// made invisible
@@ -354,7 +359,7 @@ interface
354
359
{$endif COMPILER_12_UP}
355
360
356
361
const
357
- VTVersion = '4.8.6 ';
362
+ VTVersion = '4.8.7 ';
358
363
VTTreeStreamVersion = 2;
359
364
VTHeaderStreamVersion = 6; // The header needs an own stream version to indicate changes only relevant to the header.
360
365
@@ -15550,7 +15555,8 @@ procedure TBaseVirtualTree.PrepareBitmaps(NeedButtons, NeedLines: Boolean);
15550
15555
{$Ifdef ThemeSupport}
15551
15556
if IsWinVistaOrAbove and (tsUseThemes in FStates) and (toUseExplorerTheme in FOptions.FPaintOptions) then
15552
15557
begin
15553
- if not (coParentColor in FHeader.FColumns[FHeader.FMainColumn].FOptions) then
15558
+ if (FHeader.FMainColumn > NoColumn) and not
15559
+ (coParentColor in FHeader.FColumns[FHeader.FMainColumn].FOptions) then
15554
15560
Brush.Color := FHeader.FColumns[FHeader.FMainColumn].Color
15555
15561
else
15556
15562
Brush.Color := Self.Color;
@@ -15706,6 +15712,11 @@ procedure TBaseVirtualTree.PrepareBitmaps(NeedButtons, NeedLines: Boolean);
15706
15712
FDottedBrush := CreatePatternBrush(PatternBitmap);
15707
15713
DeleteObject(PatternBitmap);
15708
15714
end;
15715
+
15716
+ {$ifdef ThemeSupport}
15717
+ if Theme <> 0 then
15718
+ CloseThemeData(Theme);
15719
+ {$endif}
15709
15720
end;
15710
15721
15711
15722
//----------------------------------------------------------------------------------------------------------------------
@@ -17999,31 +18010,7 @@ procedure TBaseVirtualTree.WMKeyDown(var Message: TWMKeyDown);
17999
18010
end;
18000
18011
end;
18001
18012
VK_PRIOR:
18002
- if Shift = [ssCtrl, ssShift] then
18003
- SetOffsetX(FOffsetX + ClientWidth)
18004
- else if [ssShift] = Shift then
18005
- begin
18006
- if FFocusedColumn = InvalidColumn then
18007
- NewColumn := FHeader.FColumns.GetFirstVisibleColumn
18008
- else
18009
- begin
18010
- Offset := FHeader.FColumns.GetVisibleFixedWidth;
18011
- NewColumn := FFocusedColumn;
18012
- while True do
18013
- begin
18014
- TempColumn := FHeader.FColumns.GetPreviousVisibleColumn(NewColumn);
18015
- NewWidth := FHeader.FColumns[NewColumn].Width;
18016
- if (TempColumn <= NoColumn) or
18017
- (Offset + NewWidth >= ClientWidth) or
18018
- (coFixed in FHeader.FColumns[TempColumn].FOptions) then
18019
- Break;
18020
- NewColumn := TempColumn;
18021
- Inc(Offset, NewWidth);
18022
- end;
18023
- end;
18024
- SetFocusedColumn(NewColumn);
18025
- end
18026
- else if ssCtrl in Shift then
18013
+ if ssCtrl in Shift then
18027
18014
SetOffsetY(FOffsetY + ClientHeight)
18028
18015
else
18029
18016
begin
@@ -18048,31 +18035,7 @@ procedure TBaseVirtualTree.WMKeyDown(var Message: TWMKeyDown);
18048
18035
FocusedNode := Node;
18049
18036
end;
18050
18037
VK_NEXT:
18051
- if Shift = [ssCtrl, ssShift] then
18052
- SetOffsetX(FOffsetX - ClientWidth)
18053
- else if [ssShift] = Shift then
18054
- begin
18055
- if FFocusedColumn = InvalidColumn then
18056
- NewColumn := FHeader.FColumns.GetFirstVisibleColumn
18057
- else
18058
- begin
18059
- Offset := FHeader.FColumns.GetVisibleFixedWidth;
18060
- NewColumn := FFocusedColumn;
18061
- while True do
18062
- begin
18063
- TempColumn := FHeader.FColumns.GetNextVisibleColumn(NewColumn);
18064
- NewWidth := FHeader.FColumns[NewColumn].Width;
18065
- if (TempColumn <= NoColumn) or
18066
- (Offset + NewWidth >= ClientWidth) or
18067
- (coFixed in FHeader.FColumns[TempColumn].FOptions) then
18068
- Break;
18069
- NewColumn := TempColumn;
18070
- Inc(Offset, NewWidth);
18071
- end;
18072
- end;
18073
- SetFocusedColumn(NewColumn);
18074
- end
18075
- else if ssCtrl in Shift then
18038
+ if ssCtrl in Shift then
18076
18039
SetOffsetY(FOffsetY - ClientHeight)
18077
18040
else
18078
18041
begin
0 commit comments