Home » Community » Newbie corner » Help needed with OptionTree
Re: Help needed with OptionTree [message #60289 is a reply to message #60288] |
Sun, 12 November 2023 19:53  |
Tom1
Messages: 1305 Registered: March 2007
|
Ultimate Contributor |
|
|
Hi again,
My above solution would work if Copy() in TreeCtrl.cpp did not clear the ctrl with "x.ctrl = NULL;". See below:
int Copy(TreeCtrl& dst, int did, int i, const TreeCtrl& src, int id)
{
TreeCtrl::Node x = src.GetNode(id);
x.ctrl = NULL;
did = dst.Insert(did, i, x);
dst.Open(did, src.IsOpen(id));
for(int i = 0; i < src.GetChildCount(id); i++)
Copy(dst, did, i, src, src.GetChild(id, i));
return did;
}
Well, I can probably go around this issue by duplicating and modifying the code for TreeCtrl::InsertDrop() and Copy(), in order to get my drop to cleanly move the item.
Best regards,
Tom
|
|
|
Goto Forum:
Current Time: Sun Aug 24 10:51:02 CEST 2025
Total time taken to generate the page: 0.04356 seconds
|