How do I hide the text cursor in wx.TextCtrl?

339 Views Asked by At

I'm using TextCtrl in wxPython to display text read-only:

control = wx.TextCtrl(self, style=wx.TE_MULTILINE | wx.TE_READONLY)

However, the text cursor is still there, blinking.

Can I somehow hide that cursor (not the mouse pointer)?

1

There are 1 best solutions below

0
VZ. On

The caret is always shown in the text controls because it's useful even when they're read-only because it allows selecting and copying text from them. If you don't need this functionality, simply use wxStaticText instead.