Search code examples
pythonwxpython

Disable cursor in TextCtrl - wxPython


I have code as follows

log = wx.TextCtrl(panel, wx.ID_ANY, size=(300,100), style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.TE_DONTWRAP)

I'm writing logs into this box by redirecting stdout. How do I make the cursor dissappear for the TextCtrl because it appends logs based on the position of the cursor right now. I dont want to give the user the privilage to place the cursor at a particular spot in the box basically


Solution

  • ummmm

    log.Enable(False) 
    

    ?

    I think ...

    or if you feel awesome you could also do

    log.Disable()