Python Forum
[WxPython] List of URLs. wx.richtext.RichTextCtrl
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[WxPython] List of URLs. wx.richtext.RichTextCtrl
#1
There is an object:

import wx.richtext as rt
...
self.m_textCtrl_text = rt.RichTextCtrl(self.panel, -1, self.text, wx.DefaultPosition, (500, 100))
Periodical I insert in it hyperlinks:

urlStyle = rt.RichTextAttr()
urlStyle.SetTextColour(wx.Colour(attrs['fill']))
urlStyle.SetFontUnderlined(strToBool(attrs['underline']))

self.m_textCtrl_text.BeginStyle(urlStyle)
self.m_textCtrl_text.BeginURL(attrs['link'])
self.m_textCtrl_text.WriteText(attrs['text'])
self.m_textCtrl_text.EndURL()
self.m_textCtrl_text.EndStyle()
How to find all the hyperlinks in the text? Is it possible to implement this?
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020