I’m using the wx.RichTextCtrl to make a Rich text editor, I’m using the wxPython version 2.8.8.1. My doubt is, How can I drag images in RichTextCtrl widget?
I tried this Way:
*Take a reference to the RichTextImage when I click.
Remove the image:
ParentParagraph.RemoveChild(image)
Insert the image in new position
MyRichtext.WriteImage(image.GetImage())
But the problem is, How could I get the new insertion pointj based on the mouse position?
I'm using the wx.RichTextCtrl to make a Rich text editor, I'm using the wxPython version 2.8.8.1 <http://2.8.8.1>. My doubt is, How can I drag images in RichTextCtrl widget?
I tried this Way:
*Take a reference to the RichTextImage when I click.
* Remove the image:
ParentParagraph.RemoveChild(image)
* Insert the image in new position
MyRichtext.WriteImage(image.GetImage())
But the problem is, How could I get the new insertion pointj based on the mouse position?
HitTest(point) returns a 2-tuple of flags and the insertion point.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!