G
Guest
Hello folks,
i like to Drag and Drop "textdata" into an *multiline* RichTextBox.
The online doc explain to solve this problem by using code like this:
void InpFormelDragDrop(object sender, System.Windows.Forms.DragEventArgs e)
{
if(e.Data.GetDataPresent( typeof(myData))) {
myData Daten = (myData)e.Data.GetData(typeof(myData));
inpFormel.Text = Daten.aText;
}
}
.... but instead of replacing the existing text, I need to insert the text.
The insertposition have to be at mouse position.
How can I locate the position (e.g. Number of char into the string)
were the user like to drop the the text?
Thanks in advance for any help
Niels
i like to Drag and Drop "textdata" into an *multiline* RichTextBox.
The online doc explain to solve this problem by using code like this:
void InpFormelDragDrop(object sender, System.Windows.Forms.DragEventArgs e)
{
if(e.Data.GetDataPresent( typeof(myData))) {
myData Daten = (myData)e.Data.GetData(typeof(myData));
inpFormel.Text = Daten.aText;
}
}
.... but instead of replacing the existing text, I need to insert the text.
The insertposition have to be at mouse position.
How can I locate the position (e.g. Number of char into the string)
were the user like to drop the the text?
Thanks in advance for any help
Niels