You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to use DragEnter/DragDrop on a textbox or TextArea in tis case to drop file names into the Text control is not working.
It appears that teh DragEnter Event is not being fired
Expected Behavior
When draging a File onto a text box useing DragEffects.link fie the DragEnter Event and DragDrop Event to allow the link.localPath to be assigned to textbox.text
Actual Behavior
a thumbnail image appears at the cursor but the DragEnter event never fires
Steps to Reproduce the Problem
Drag File from Explorer onto the TextBox
Code that Demonstrates the Problem
using System;
using Eto.Forms;
using Eto.Drawing;
using System.Linq;
using System.Diagnostics;
using MyControl = Eto.Forms.TextBox;
namespace EtoApp1
{
public partial class MainForm : Form
{
public MainForm()
{
Title = "My Eto Form";
MinimumSize = new Size(400, 400);
var drawable = new MyControl { };
drawable.AllowDrop = true;
drawable.DragEnter += Drawable_Drag;
drawable.DragDrop += Drawable_Drag;
drawable.BackgroundColor = Colors.White;
Content = new StackLayout
{
Padding = 10,
Items =
{
drawable
}
};
}
private void Drawable_Drag(object sender, DragEventArgs e)
{
e.Effects = DragEffects.Link;
var files = e.Data.Uris.Select(r => r.LocalPath).ToArray();
Debug.WriteLine(files);
foreach (var file in files)
((MyControl)sender).Text=file ;
}
}
}
Specifications
Version: 2.6.1
Platform(s):
Operating System(s): <Windows 10 Pro, version 21H2 -->
On XamMac under macOS 12.2.1 the event works fine on a TextBox
The text was updated successfully, but these errors were encountered:
Trying to use DragEnter/DragDrop on a textbox or TextArea in tis case to drop file names into the Text control is not working.
It appears that teh DragEnter Event is not being fired
Expected Behavior
When draging a File onto a text box useing DragEffects.link fie the DragEnter Event and DragDrop Event to allow the link.localPath to be assigned to textbox.text
Actual Behavior
a thumbnail image appears at the cursor but the DragEnter event never fires
Steps to Reproduce the Problem
Code that Demonstrates the Problem
Specifications
On XamMac under macOS 12.2.1 the event works fine on a TextBox
The text was updated successfully, but these errors were encountered: