[WxPython] List of URLs. wx.richtext.RichTextCtrl - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: GUI (https://python-forum.io/forum-10.html) +--- Thread: [WxPython] List of URLs. wx.richtext.RichTextCtrl (/thread-12028.html) |
List of URLs. wx.richtext.RichTextCtrl - ioprst - Aug-06-2018 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? |