I have a RichTextCtrl with some text and images. How do I determine
if there is an image at the current insertion point or at any
particular index? How do I determine which image is at that location?
Thanks,
Mike
I have a RichTextCtrl with some text and images. How do I determine
if there is an image at the current insertion point or at any
particular index? How do I determine which image is at that location?
Thanks,
Mike
Hi,
(sorry for my english : im french)
Got to this page : http://www.wxpython.org/docs/api/wx.richtext.RichTextObject-class.html
I'm sure you'll find what you're searching for.
By example, you maybe can use "FindObjectAtPosition" in
"RichTextParagraph". It will maybe return a RichTextImage object.
Good luck
Ivan
To follow my previous post, there's some code i've just found in one
of my soft :
buffer = self.rtc.GetBuffer()
p = buffer.GetChildren()[0]
image = p.FindObjectAtPosition(0)
image.SetMargins(30, 30, 30, 30)
print image.GetRect()
print image.GetImage()
print image.GetImageBlock()
Maybe that'll help you.
Bye
Ivan
Thank you very much for your help! This is what I needed to get going
in the right direction.
Thanks again,
Mike
On Mar 1, 2:27 am, clshlan <webmaster.clshlanni...@wanadoo.fr> wrote:
To follow my previous post, there's some code i've just found in one
of my soft :buffer = self.rtc.GetBuffer()
p = buffer.GetChildren()[0]
image = p.FindObjectAtPosition(0)
image.SetMargins(30, 30, 30, 30)
print image.GetRect()
print image.GetImage()
print image.GetImageBlock()Maybe that'll help you.
Bye
Ivan