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
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.

[Updated on: Tue, 25 September 2007 20:50] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat Apr 26 22:23:51 CEST 2025
Total time taken to generate the page: 0.00660 seconds
|