After some more info, I present this solution:
void Initialize()
{
listBox1.Items.AddRange(new object[]{"this", "is","some","data"});
listBox1.SelectedIndexChanged += new EventHandler(OnSelectedIndexChanged);}
void OnSelectedIndexChanged(object sender, EventArgs e)
{
ListBox lb = (ListBox)sender;
if (lb.SelectedIndex == -1)
return;
listBox2.Items.Add(lb.SelectedItem);
lb.Items.Remove(lb.SelectedItem);
lb.SelectedIndex = -1;
}
Ok, now I know that this really is a drag n'drop question.
[
Try this article]. It should have popped up if your googled "listbox drag drop".