Ticket #14735 (new defect)

Opened 8 months ago

Last modified 6 months ago

RichTextCtrl underline not working correctly on Windows

Reported by: transana Owned by:
Priority: normal Milestone:
Component: wxRichText Version:
Keywords: underline windows RichTextCtrl Cc:
Blocked By: Patch: no
Blocking:

Description

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, Bold, or Italics call is made elsewhere.

Removing underlining always occurs immediately. Bold and Italics work immediately. Underlining works fine on lines that also contain bold or italics, but not when used alone. The same code that fails on Windows works correctly on Ubuntu and OS X.

I've verified this in wxPython 2.8.12.1 and 2.9.4.0, and was referred here by Robin Dunn, who suggested this was more likely a wxWidgets issue than a wxPython issue.

Attachments

RTF Format Problem.py download (4.0 KB) - added by transana 8 months ago.
wxPython example of RichTextCtrl underline problem

Change History

Changed 8 months ago by transana

wxPython example of RichTextCtrl underline problem

Changed 6 months ago by transana

I see a second variation of this problem sometimes, particularly near the end of a document that has little text or very few format changes. If I have a paragraph of several sentences, and I try to underline a single word or part of a word, the entire line will be underlined. If I pick a selection (even a single character) outside of what I had selected and turn underlining off, then all the underlining that should not have been drawn will disappear. If the word I'm trying to underline a word in the middle of the line and the whole line gets underlined, removing underlining from a character on one side of the original word will cause the underlining on BOTH sides of the original word to disappear.

Some users have reported that this behavior is different with different fonts. In my experience, Courier New is particularly susceptible to problems. Unfortunately, it's also a favorite font of a segment of my users who need a fixed-width font for their work with my program.

Note: See TracTickets for help on using tickets.