Hello all,
I’d like to display a bit of uneditable text using a wx.TextCtrl. I have already .SetEditable(False), but I want to make it even more obvious that the text is not editable. Currently, if I hover the mouse over the control, it changes into that text pointer icon (looks like an I). I tried stopping the event propagation of EVT_ENTER_WINDOW, but that stop the cursor from changing, it just stopped me from being able to drag to copy & paste (which I don’t necessarily want to prevent).
How would I go about doing this?
Thanks in advance,
Hi,
you can simply set the mouse pointer explicitly, e.g.:
my_TxtCtrl.SetCursor(wx.StockCursor(wx.CURSOR_ARROW))
cf.:
http://wxpython.org/docs/api/wx.Cursor-class.html
(I am not sure, whether it is possible to let the cursor stay unchanged implicitely for whatever mouse pointer there would be active outside of the respective textctrl.)
hth,
vbr
···
2013/4/19 Claudiu csaftoiu@gmail.com
Hello all,
I’d like to display a bit of uneditable text using a wx.TextCtrl. I have already .SetEditable(False), but I want to make it even more obvious that the text is not editable. Currently, if I hover the mouse over the control, it changes into that text pointer icon (looks like an I). I tried stopping the event propagation of EVT_ENTER_WINDOW, but that stop the cursor from changing, it just stopped me from being able to drag to copy & paste (which I don’t necessarily want to prevent).
How would I go about doing this?
Thanks in advance,