anchor.diff:    end;
   end;
   
  +function TfpgTreeView.NextNode(ANode: TfpgTreeNode): TfpgTreeNode;
  +  //----------------
  +  procedure _FindNextNode;
  +  begin
  +    if ANode.Next <> nil then
  +    begin
  +      result := ANode.Next;
  +    end
  +    else
  +    begin
  +      while ANode.Next = nil do
  +      begin
  +        ANode := ANode.Parent;
  +        if ANode = nil then
  +          exit;  //==>
  +      end;
  +      result := ANode.Next;
  +    end;
  +  end;
  +
  +begin
  +  result := nil;
  +  if ANode.Count > 0 then
  +    result := ANode.FirstSubNode
  +  else
  +    _FindNextNode;
  +end;
  +
  +function TfpgTreeView.PrevNode(ANode: TfpgTreeNode): TfpgTreeNode;
  +var
  +  n: TfpgTreeNode;
  +begin
  +  n := ANode;
  +  if ANode.Prev <> nil then
  +  begin
  +    result  := ANode.Prev;
  +    ANode   := ANode.Prev;
  +    while {(not ANode.Collapsed) and} (ANode.Count > 0) do
  +    begin
  +      result  := ANode.LastSubNode;
  +      ANode   := ANode.LastSubNode;
  +    end;
  +  end
  +  else
  +  begin
  +    if ANode.Parent <> nil then
  +      result := ANode.Parent
  +    else
  +      result := n;
  +  end;
  +end;
  +
   function TfpgTreeview.SpaceToVisibleNext(aNode: TfpgTreeNode): integer;
   var
     h: TfpgTreeNode;
  
positive.code:     procedure   DrawHeader(ACol: integer; ARect: TfpgRect; AFlags: integer); virtual;
      procedure   DoChange; virtual;
      procedure   DoExpand(ANode: TfpgTreeNode); virtual;
      function    NextVisualNode(ANode: TfpgTreeNode): TfpgTreeNode;
      function    PrevVisualNode(ANode: TfpgTreeNode): TfpgTreeNode;
      // the nodes between the given node and the direct next node
      function    SpaceToVisibleNext(aNode: TfpgTreeNode): integer;
      function    StepToRoot(aNode: TfpgTreeNode): integer;
  
negative.code:     result := h^.width
    else // not found -> returns the default
      result := DefaultColumnWidth;
  end;
  
  procedure TfpgTreeView.GotoNextNodeUp;
  begin
    if Selection = RootNode.FirstSubNode then
      Exit;
    Selection := PrevNode(Selection);
  end;
  
  procedure TfpgTreeView.GotoNextNodeDown;
  begin
    if Selection = RootNode.LastSubNode then
      Exit;
    Selection := NextNode(Selection);
  end;
  
  procedure TfpgTreeview.PreCalcColumnLeft;
  