How to remove the Strikethrough without removing other Style like bold,italic...?

I have a text in richtextctrl. When I tried to remove the strikethrough of the selected text , I got a text without strikethrough and without other styles like bold.
Is there any way to remove the strikethrough while keeping the original style of the selected text.

Thanks in advanced.

I have a text in richtextctrl. When I tried to remove the strikethrough of the selected text , I got a text without strikethrough and without other styles like bold.
Is there any way to remove the strikethrough while keeping the original style of the selected text.

It depends on how you add and remove styles. BeginBold(), BeginItalics(), BeginUnderline() and their matching End commands, for example, "stack" (accoring to Julian of wxWidgets) so that any End command will remove the LAST added element rather than the one it's named for. And if you're applying a style you've defined that includes specifications for multiple attributes, all of the attributes addressed by that style will be changed.

If you take a look at the wxPython Demo, you'll see the SetFontStyle() method I added to the Demo that allows you to arbitrarily add and remove styles in any order. I didn't explicitly support the strikethrough style with that method, but it should help you figure it out.

If this doesn't help, make a small sample app for us, so we can see exactly what you're doing.

David

Thanks, I made it works.
I used richtextattr.

···

On Friday, January 15, 2016 at 1:51:25 PM UTC-5, David wrote:

I have a text in richtextctrl. When I tried to remove the
strikethrough of the selected text , I got a text without
strikethrough and without other styles like bold.

Is there any way to remove the strikethrough while keeping the
original style of the selected text.

It depends on how you add and remove styles. BeginBold(),
BeginItalics(), BeginUnderline() and their matching End commands, for
example, “stack” (accoring to Julian of wxWidgets) so that any End
command will remove the LAST added element rather than the one it’s
named for. And if you’re applying a style you’ve defined that includes
specifications for multiple attributes, all of the attributes addressed
by that style will be changed.

If you take a look at the wxPython Demo, you’ll see the SetFontStyle()
method I added to the Demo that allows you to arbitrarily add and remove
styles in any order. I didn’t explicitly support the strikethrough
style with that method, but it should help you figure it out.

If this doesn’t help, make a small sample app for us, so we can see
exactly what you’re doing.

David