dragdrop .csv files issue

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Sharkann
Newbie
Newbie
Posts: 17
Joined: Fri Apr 22, 2022 12:00 am

dragdrop .csv files issue

Post by Sharkann » Wed Dec 20, 2023 9:17 am

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

Marc
Site Admin
Site Admin
Posts: 1217
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: dragdrop .csv files issue

Post by Marc » Fri Dec 29, 2023 12:20 pm

Hello Sharkann,

Please check this forum thread for a working example:

Drag-Drop onto custom Y-axis chart area

Regards,
Marc Meumann
Steema Support

Post Reply