If I put a RichTextCtrl in a Notebook, on Mac OS X
the cursor continues to flash when I switch to a
different tab. Example follows. Any work-around?
TIA, Phil
import sys
import wx
import wx.richtext as rt
action = """Click on the "Second" tab.
On Mac OS X 10.3.9, the cursors from "First" still show.
Using wx 2.8.7.1
Python 2.5.2
"""
class Page(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent)
sizer = wx.BoxSizer(wx.VERTICAL)
for text in ("wx version = %s"%str(wx.VERSION), sys.version):
ctl = rt.RichTextCtrl(self, value=text, size=(400,100))
ctl.SetInsertionPoint(4)
sizer.Add(ctl)
self.SetSizer(sizer)
class Dlg(wx.Dialog):
def __init__(self):
wx.Dialog.__init__(self, None, -1, u"Cursor problem")
sizer = wx.BoxSizer(wx.VERTICAL)
sizer.Add(wx.StaticText(self, -1, action), 0, wx.ALL, 5)
nb = wx.Notebook(self)
pg = Page(nb)
nb.AddPage(pg, "First")
pg = wx.Panel(nb)
nb.AddPage(pg, "Second")
sizer.Add(nb, 0, wx.ALL, 5)
self.SetSizer(sizer)
sizer.Fit(self)
if __name__ == '__main__':
app = wx.PySimpleApp()
Dlg().ShowModal()