Page 1 of 1

dragdrop .csv files issue

Posted: Wed Dec 20, 2023 9:17 am
by 15693683
Hi,

I'd like to dragdrop a batch of csv files over the teechart to plot their contents.
Unfortunately, I don't succed in doing the drag drop operation.
Here my code :

Code: Select all

   Private Sub TChart1_DragEnter(sender As Object, e As DragEventArgs) Handles TChart1.DragEnter
       e.Effect = DragDropEffects.All
   End Sub
   Private Sub TChart1_DragDrop(sender As Object, e As DragEventArgs) Handles TChart1.DragDrop
       If e.Data.GetDataPresent(DataFormats.FileDrop) Then
           file_list = e.Data.GetData(DataFormats.FileDrop)
       End If
       e.Effect = Nothing
   End Sub
   
At the end, the file_list string array is empty...
Changing the DragDropEffects.All to DragDropEffects.Copy won't change anything.

What's going wrong ?

Thanks
Sharkann

Re: dragdrop .csv files issue

Posted: Fri Dec 29, 2023 12:20 pm
by Marc
Hello Sharkann,

Please check this forum thread for a working example:

Drag-Drop onto custom Y-axis chart area

Regards,
Marc Meumann