Click here to Skip to main content
16,005,162 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I manage to do drag and drop using two different listbox and it works good but how to do the drag and drop in the same listbox ?

sorry i still new with this.

What I have tried:

private void lisBox2_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.StringFormat))
{
string str = (string)e.Data.GetData(DataFormats.StringFormat);

swapBetweenList(selectedIndex, movingIndex);

//lisBox2.Items.Add(str);
}

}
Posted
Updated 24-Aug-16 4:34am

1 solution

Use a Drag-and-Drop ListBox[^].

/ravi
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900