On 10/4/12 2:28 PM, David Woods wrote:
> Hi all,
>
> I'm having a problem with text formatting in the RichTextCtrl on Windows
> only. I see the same thing in wxPython 2.8.12.1 and 2.9.4.0. I've
> tried Windows 7 and Windows XP, as well as OS X and Ubuntu. It fails on
> Windows, not OS X or Linux.
>
> The RichTextCtrl has handy formatting methods for
> ApplyBoldToSelection(), ApplyItalicToSelection() and
> ApplyUnderlineToSelelction(). But on Windows,
> ApplyUnderlineToSelection() doesn't always show up immediately. If you
> underline a selection, the underlining for that original selection won't
> show up until a subsequent Underline or Bold call is made elsewhere.
> Removing underlining always occurs immediately. Bold and Italics appear
> to work immediately. Underlining appears to work if called immediately
> AFTER Bold. But sometimes it doesn't happen immediately.
>
> Update(), Refresh(), and UpdateWindowUI() have no effect.
>
> I've attached a simple sample.
>
> 1. Can others replicate this?
Yes.
>
> 2. Is there a workaround anyone can find?
>
> 3. Is this an issue with my code, wxPython, or wxWidgets?
Looks like a wxWidgets bug to me. Please create a ticket about it at
trac.wxwidgets.org.
--
Robin Dunn
Software Craftsman
http://wxPython.org