[wx 2.8.7 OSX gcc] wxRichTextCtrl fires an EraseBackgroundEvent each times caracters are pressed

Julian Smart julian at anthemion.co.uk
Sat Feb 9 01:00:27 PST 2008


Phil White wrote:
> Julian Smart <julian <at> anthemion.co.uk> writes:
>
>   
>> Phil White wrote:
>>     
>>>   Hi, I was wondering how come each times a caracter is pressed in a 
>>> richtextctrl, the parent's wxEraseEvent is fired?? It is a normal 
>>> behavior? On wxMSW and wxGTK, it doesn't fire.
>>>
>>>   Any other person has come across the same problem?
>>>       
>> I guess wxMac doesn't check for the wxBG_STYLE_CUSTOM background style 
>> to suppress erase events (Refresh() will be called each time a character 
>> is pressed, hence the erase event). However wxRichTextCtrl defines an 
>> empty erase event handler to ignore it anyway. Is it a problem?
>>
>> Regards,
>>
>> Julian
>>
>>     
>
>   Hi Julian. I searched into source code and yes, you are right, the wxMac
> doesn't check for the background style. I'm tracking down a performance issue of
> wxRichTextCtrl on wxMac. I don't know for sure why it happens, but when typed
> text reaches the wxRichTextCtrl's screen width, it becomes to be really slow
> while typing caracters on screen. That's why I thought it was the performance
> issue problem.
>
> Anyone got this performance issue before me? There's a flag to disable on wxMac?
> On other platforms, it just goes well.
>   
If you use the latest richtextbuffer.cpp from SVN the performance is 
considerably better (I reimplemented word wrapping).

Best regards,

Julian




More information about the wx-users mailing list