ric писал(а):
NescoЯ посмотрю
--- Добавлено в 2021-11-27 14:31:29
Исправь внутри hiTreeViewTrain.pas код вот на этот:
function THITreeViewTrain.AddNodeAt;
var
dt:TData;
fd:PData;
node:cardinal;
cap:string;
begin
dt := Data;
new(fd);
FillChar(fd^, sizeof(TData), 0);
CopyData(fd,@dt);
if getItem(dt, _prop_CaptionIndex) then
cap := ToString(dt)
else cap := 'node';
node := Control.TVInsert(pid, 0, cap);
Control.TVItemData[node] := fd;
dt := Data;
if _prop_CheckBoxes then
begin
if getItem(dt, _prop_CheckBoxIndex) then
Control.TVItemStateImg[node] := ToInteger(dt) + 1
else
Control.TVItemStateImg[node] := 0;
end;
dt := Data;
if (Control.ImageListNormal <> nil) and getItem(dt, _prop_IconIndex) then
begin
Control.TVItemImage[node] := ToInteger(dt);
Control.TVItemSelImg[node] := Control.TVItemImage[node];
end;
Result := ADD_ERR_SUCCESS;
if _prop_UseHashMap then
begin
dt := Data;
getItem(dt, _prop_IDIndex);
FHash.AddObject(ToString(dt), node);
end;
if last <> nil then
last^ := node;
end;