-
Notifications
You must be signed in to change notification settings - Fork 274
Description
Very strange behaviour in 64-Bit versions of C++ Builder projects (RAD Studio 12.3 with Virtual-TreeView-8.2) ...
I can set TVirtualStringTree->Header->SortColumn with a new value, that's Ok. But getting the value returns always 8 (even when getting the value directly after setting a new one!). As I found out, the return value is always the value of TVirtualStringTree->Header->SplitterHitTolerance (when changing SplitterHitTolerance value, the return value of SortColumn changes!).
Same problem with TVirtualStringTree->Header->SortDirection which also returns always the same value.
While 32-Bit version works fine, it is an unexpected behaviour in both 64-Bit versions (modern or not).
Delphi projects (32-/64-Bit) are not affected.
After replacing property read variables by functions everything works as expected.
Could be a bug in 64-bit-compilers - perhaps fixed in RAD Studio 13 (I have not updated yet). More properties could be affected in the same way.
Here are the lines I have changed (in TVTHeader class):
property SortColumn : TColumnIndex read GetSortColumn write SetSortColumn default NoColumn;
property SortDirection : TSortDirection read GetSortDirection write SetSortDirection default sdAscending;
function TVTHeader.GetSortColumn : TColumnIndex;
begin
if FColumns.Count > 0 then
Result := FSortColumn
else
Result := NoColumn;
end;
function TVTHeader.GetSortDirection : TSortDirection;
begin
Result := FSortDirection
end;