Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Drag & Drop example or documentation?
Drag & Drop example or documentation? [message #11778] Tue, 25 September 2007 17:25
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Removed original whining due to fact that its easy to use drag and drop given the TreeCtrlDnD example. I will try to come up with a better documented example myself but until then, to anyone out there who wants to use DnD check out the example in reference and remember to that if you want to see what what copied you can use

	void DropInsert(int parent, int ii, PasteClip& d)
	{
		tree.AdjustAction(parent, d);
		if(AcceptInternal<TreeCtrl>(d, "mytreedrag")) {
			const TreeCtrl &src = GetInternal<TreeCtrl>(d); // JT
			Vector<int> sel = src.GetSel(); // JT
			// Etc.
			for(int i=0;i<sel.GetCount();i++)
			{
				DUMP(parent);
				DUMP(ii);
				DUMP(sel[i]);	
			}			
			tree.InsertDrop(parent, ii, d);
			tree.SetFocus();
			return;
		}
		if(AcceptText(d)) {
			tree.SetCursor(tree.Insert(parent, ii, Image(), GetString(d)));
			tree.SetFocus();
			return;
		}
	}


(thanks MrJT) and if you want to do anything special then forget about using InsertDrop() and do the inserting yourself.

Smile

[Updated on: Tue, 25 September 2007 20:50]

Report message to a moderator

Previous Topic: Q: Language support
Next Topic: How to determine if a key is down or up? (Aside from system keys)
Goto Forum:
  


Current Time: Thu Apr 18 09:00:43 CEST 2024

Total time taken to generate the page: 0.01983 seconds