Skip to content

DevExpress-Examples/winforms-richedit-perform-drag-and-drop-from-list-box

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rich Text Editor for WinForms - How to Perform Drag-and-Drop from a List Box

This example illustrates how to perform the drag-and-drop operation in case of a list box.

To do this, handle the following RichEditControl events:

  • DragEnter
  • DragOver
  • DragDrop

In the DragOver event handler, update the RichEditControl.Document.CaretPosition property value according to the current mouse position. Also, you might want to draw a custom insertion marker in this event handler.

If you use the standard caret, call the RichEditControl.Focus() method in the DragEnter event handler. Use the RichEditControl.ScrollToCaret method to scroll the document to the caret position if you move the caret outside of the visible document area.

Files to Review

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Handle the corresponding events to drag-and-drop data from ListBox to RichEditControl.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •