Hi!
I am trying to write a class which will mark some special words in wx.TextCtrls in my application.
I want to do this by drawing some lines on TextCtrl under the text.
What is the best way to implement this?
I've tried drawing them in handling wx.EVT_PAINT using PaintDC, but then the text from TextCtrl is not displayed and there are some artifacts displayed.
If I call the function which draws the lines using wx.CallAfter in wx.EVT_PAINT handling (using ClientDC), it seems ok, but it crashes application when used in TextCtrl in wx.combo.ComboCtrl with message "pure virtual function call".
If I draw them in handling wx.EVT_UPDATE_UI using ClientDC, and it also seems ok, but the lines are not drawn in wx.combo.ComboCtrl (although I can see them for a moment when I open the context menu).
Is there any way to draw on TextCtrl using PaintDC, so that the text is still displayed?
Or is there a way to draw anything on wx.combo.ComboCtrl?
Or is there a place where I can find when wx.EVT_PAINT and wx.EVT_UPDATE_UI are sent in wx.combo.ComboCtrl?
Regards,
Mateusz
PS1: I'm using wxPython 2.9.2.1, Windows XP
PS2: I cannot use any non-standard TextCtrl (wx.TE_RICH / wx.TE_RICH2/StyledTextCtrl) due to some business requirements.