U++ framework
Do not panic. Ask here before giving up.

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 Go to previous message
Tom1
Messages: 1319
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
 
Read Message
Read Message
Read Message
Previous Topic: How do I write string_view to Cout() without copying to a String?
Next Topic: Tutorial update(s)
Goto Forum:
  


Current Time: Sat Oct 31 05:31:34 GMT+1 2026

Total time taken to generate the page: 0.42496 seconds