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 |
nixnixnix
Messages: 415 Registered: February 2007 Location: Kelowna, British Columbia
|
Senior Member |
|
|
it would be nice if it worked with images and options too
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
oh and the node selection is weak like in my version.
Is this something that might get added to the UPP TreeCtrl?
Nick
|
|
|
|
|
Like the new Drag and Drop TreeCtrl but...
|
|
|
Re: Like the new Drag and Drop TreeCtrl but...
By: mirek on Sun, 19 August 2007 15:01
|
|
|
Re: Like the new Drag and Drop TreeCtrl but...
|
|
|
Re: Like the new Drag and Drop TreeCtrl but...
By: mirek on Thu, 23 August 2007 17:35
|
|
|
Re: Like the new Drag and Drop TreeCtrl but...
|
|
|
Re: Like the new Drag and Drop TreeCtrl but...
By: mirek on Tue, 28 August 2007 13:13
|
|
|
Re: Like the new Drag and Drop TreeCtrl but...
|
|
|
Re: Like the new Drag and Drop TreeCtrl but...
By: mirek on Wed, 29 August 2007 11:30
|
|
|
Re: Like the new Drag and Drop TreeCtrl but...
|
|
|
Re: Like the new Drag and Drop TreeCtrl but...
By: mirek on Fri, 31 August 2007 08:08
|
|
|
Re: Like the new Drag and Drop TreeCtrl but...
|
|
|
Re: Like the new Drag and Drop TreeCtrl but...
By: mirek on Mon, 03 September 2007 00:15
|
|
|
Re: Like the new Drag and Drop TreeCtrl but...
By: nixnixnix on Tue, 18 September 2007 04:15
|
|
|
Re: Like the new Drag and Drop TreeCtrl but...
By: mirek on Thu, 20 September 2007 23:29
|
|
|
Re: Like the new Drag and Drop TreeCtrl but...
By: nixnixnix on Mon, 24 September 2007 16:29
|
|
|
Re: Like the new Drag and Drop TreeCtrl but...
By: mirek on Mon, 24 September 2007 23:59
|
|
|
Re: Like the new Drag and Drop TreeCtrl but...
By: nixnixnix on Tue, 25 September 2007 17:46
|
|
|
Re: Like the new Drag and Drop TreeCtrl but...
By: mirek on Wed, 26 September 2007 00:14
|
|
|
Re: Like the new Drag and Drop TreeCtrl but...
By: nixnixnix on Wed, 26 September 2007 18:13
|
|
|
Re: Like the new Drag and Drop TreeCtrl but...
|
|
|
Re: Like the new Drag and Drop TreeCtrl but...
By: mrjt on Tue, 28 August 2007 17:46
|
Goto Forum:
Current Time: Thu Apr 25 12:35:44 CEST 2024
Total time taken to generate the page: 0.03105 seconds
|