I want to remove the style of a previously styled text in a TextCtrl
and return it to the default style. In the TextCtrl
demo I changed the line 63
t4.SetStyle(44, 47, wx.TextAttr("RED", "YELLOW"))
(this line turns the word “red” to red on yellow)
to
default_style = t4.GetDefaultStyle()
t4.SetStyle(44, 47, wx.TextAttr("RED", "YELLOW"))
t4.SetStyle(45, 46, default_style)
where I thought, the last line will turn the “e” in the word “red” back to black on white. It does not.
How do I remove an already existing styling (replace it with the default styling)?