Hi tg I should of been more clear.
I added these to the code I use to add the tabs and textbox
vb Code:
AddHandler tb.DragDrop, AddressOf tb_DragDrop
AddHandler tb.MouseUp, AddressOf tb_mouseup
tb is the textbox I declared.
I then added my sub for that.
vb Code:
Private Sub tb_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs)
'this appends the listviewitem's tag to the rtb on dragdrop
Dim page As RadPageViewPage = RadPageView1.SelectedPage
For Each txt As FastColoredTextBox In page.Controls.OfType(Of FastColoredTextBox)()
If e.Data.GetDataPresent(GetType(ListViewItem)) Then
Dim item As ListViewItem = DirectCast(e.Data.GetData(GetType(ListViewItem)), ListViewItem)
txt.AppendText(item.Tag.ToString & Environment.NewLine)
End If
Next
End Sub
Is this the correct way of doing it? I cannot add the handles tb.dragdrop beside it the sub, Unless I don't need it?
I have another sub that I need to add the tb. handler to although when I try to add it it says it cannot resolve symbol. I point it out in the code below.
vb Code:
Private Sub all_DragOver(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles Me.DragOver, mainsidemenu.DragOver, ScriptEditor.DragOver <-----I need to add the tb.dragover
If e.Data.GetDataPresent(GetType(ListViewItem)) Then
e.Effect = DragDropEffects.All
End If
End Sub
Thanks TG.