Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drag&Drop To List box

Status
Not open for further replies.

RangerFan

MIS
May 4, 2000
61
US
I am trying to drap and drop the contents of a text box into<br>a list box.&nbsp;&nbsp;The actual procedure works fine.&nbsp;&nbsp;The contents<br>of the text box does end up on in the list box control,<br>however, the data shows up multiple times.&nbsp;&nbsp;If I drag the<br>text &quot;Hello&quot; to the list box I get the following:<br><br>Hello<br>Hello<br>Hello<br><br>Here is the code I am using:<br><br>Private Sub List1_DragOver(Source As Control, X As Single, Y As Single, State As Integer)<br>&nbsp;&nbsp;If TypeOf Source Is TextBox Then<br>&nbsp;&nbsp;&nbsp;&nbsp;List1.AddItem Text1.text<br>&nbsp;&nbsp;End If<br>End Sub<br><br>Any help would be greatly appreciated!
 
What do you have the DragDrop properties for the two controls set to Ranger? <p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top