Frequently Asked Component Specific Questions
Options |
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>
TMS Advanced Poly List
Drag & drop items
Drag & drop items
Drag & drop from one list to a second list can be done by implementing 2 events. Allowing an item to be dropped is setting the Accept parameter true. Dropping the item can be done by calling AddDropItem and as parameter the SelectedDragDropItem from the first list.
procedure TForm1.AdvPolyList2DragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); begin Accept := Source is TAdvPolyList; end; procedure TForm1.AdvPolyList2DragDrop(Sender, Source: TObject; X, Y: Integer); begin AdvPolyList2.AddDropItem((Source as TAdvPolyList).SelectedDragDropItem); end;
This is also explained at page 34 of the PDF Developers Guide