Another wxRichTextCtrl linking problem (sorry)
Tom Gersic
wxdev at teleologic.net
Fri Jan 26 08:42:49 PST 2007
Hi Julian,
I've noticed that when changing a selection of text from a style that
has the wxTEXT_ATTR_URL flag set to a style that does not have the
wxTEXT_ATTR_URL set, that flag is not cleared from the text. This has
the effect of removing the link's visual cues, but the link is in effect
still there, because the mouse cursor still changes to a hand, and
clicking on it still causes the link to fire. For my purposes, I just
changed SetStyle in richtextctrl.cpp from this...
bool wxRichTextCtrl::SetStyle(long start, long end, const wxTextAttrEx&
style)
{
return GetBuffer().SetStyle(wxRichTextRange(start, end-1), style);
}
...to this...
bool wxRichTextCtrl::SetStyle(long start, long end, const wxTextAttrEx&
style,int flags)
{
return GetBuffer().SetStyle(wxRichTextRange(start, end-1), style,flags);
}
...which allows me to pass wxRICHTEXT_SETSTYLE_RESET into the
wxRichTextCtrl::SetStyle() function...allowing me to clear out the flags.
Tom
More information about the wx-dev
mailing list