Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Moving Tree Nodes

1 view
Skip to first unread message

Steve Baker

unread,
Jan 29, 2008, 5:13:29 PM1/29/08
to
I wrote an application in Delphi 7 in which I can drag and drop nodes within
the tree. The same code in Delphi 2008 for dotNet doesn't work. In
general, I can move one node, but subsequent moves give the error "Item has
already been added. Key in dictionalry: ...".


procedure TMainF.tvDragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
begin
If tv.GetNodeAt(X, Y) <> Nil Then Accept := True;
end;

procedure TMainF.tvDragDrop(Sender, Source: TObject; X, Y: Integer);
begin
tv.Selected.MoveTo(tv.GetNodeAt(X, Y), naAddChild);


Steve Baker

unread,
Jan 29, 2008, 6:57:18 PM1/29/08
to
I just went back and tried the exact code in Delphi 2007 as a VCL Forms
application and it works just fine. There must be something terribly wrong
in 2008.

"Steve Baker" <St...@Umtanum.com> wrote in message
news:479fa509$1...@newsgroups.borland.com...

0 new messages