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 » TreeCtrl » Like the new Drag and Drop TreeCtrl but...
Like the new Drag and Drop TreeCtrl but... [message #11084] Sat, 18 August 2007 22:18 Go to previous message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
it would be nice if it worked with images and options too Smile

I saw the example and was thinking of replacing my drag and drop tree ctrl with yours as yours has some advantages over mine such as full selection and dropping into the middle of the hierarchy which mine doesn't do.

However, I tried to modify the example in the following way

	App() {
		Add(tree.SizePos());
		Vector<int> parent, parent2;
		Option* option = new Option[10000]; // mine
		parent.Add(0);
		tree.SetRoot(Image(), "The Tree");
		for(int i = 1; i < 10000; i++) {
			option[i].SetLabel(FormatIntRoman(i, true)); // mine
			
			TreeCtrl::Node node(CtrlImg::File(),option[i],300);	// mine		
			
			parent.Add(tree.Add(parent[rand() % parent.GetCount()], node)); // mine

//			parent.Add(tree.Add(parent[rand() % parent.GetCount()], Image(),
//			            FormatIntRoman(i, true)));
			if((rand() & 3) == 0)
				tree.Open(parent.Top());
		}
		tree.Open(0);
		tree.WhenDropInsert = THISBACK(DropInsert);
		tree.WhenDrag = THISBACK(Drag);
		tree.MultiSelect();
		Sizeable();
	}


and it comes up good but when you try to drop a node it crashes Sad

oh and the node selection is weak like in my version.

Is this something that might get added to the UPP TreeCtrl?

Nick








 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: TreeCtrl Scroll triggers Parent Refresh
Next Topic: hierarchical tree data structure & binding to TreeCtrl
Goto Forum:
  


Current Time: Thu Apr 25 12:35:44 CEST 2024

Total time taken to generate the page: 0.03105 seconds