views:

119

answers:

2

Hello,

I have a user control that is hosting a winforms listbox. I am re-sorting items in the list using drag and drop. I realized that I need a drag "target line" that shows whether I am dropping before or after a target.

Any suggestions. I am open to suggestions. I am not wed to the listbox. I can use another winforms control (the lighter the better) and I am also licensed for winforms telerik controls (a couple of version back). RadListBox does not do the data binding to my biz object correctly so I went with winforms version. But maybe another rad control would give me this out of the box.

For the record, my preference is to stick with the winforms listbox if it can work.

If I need to implement this behaviour myself does anyone have code samples or suggestons on how to do it. I would not have a clue on where to start?

Thanks.

Seth B Spearman

+1  A: 

Check out how one person provided a visual cue for where a drop operation will take place in a ListBox:

Drag-and-Drop ListBox

See his VisualCue class.

Jay Riggs
A: 

I think you might be able to just use a ListView for this instead of a ListBox.

MusiGenesis