Is there an example of Drag & Drop items within a TSectionListBox? I looked at the demo project and searched the forum, but didn't find anything.
Initially I want to prevent Drag & Drop between sections. But that might be something we decide to allow in the future.
I'll start working on a test project using ItemAtPos and GetListItemIndex and see where that gets me. But an example would be greatly appreciated.
Thanks,
Jon
You can download a sample here:
Thank you. That is very helpful and much simpler than the approach we had attempted.
Notes for anyone that may download this:
1) As-is, only compiles with XE2. Remove the scoping from the units in the uses clause (such as 'Vcl.') for earlier versions. That's all it took for XE.
2) Drag & Drop not working in the top section until I changed this:
procedure TForm1.SectionListBox1DragDrop(Sender, Source: TObject; X, Y: Integer);
...
if (sectionidx > 0) and (subitemidx >= 0) then
to this:
if (sectionidx >= 0) and (subitemidx >= 0) then