if fp.Style = [fsBold] then
fp.Style := fp.Style - [fsBold];
else
fp.Style := [fsBold];
What about italic and etc?
Better version:
if fsBold in fp.Style then
fp.Style := fp.Style - [fsBold];
else
fp.Style := fp.Style + [fsBold];
I was actually just starting to post the same question.
Even though the code above works, it only worked on if bold or not.
If I try that on italics, it takes the italics away.
So, I have to code so it takes both bold and italic into consideration.
Let me try your suggestion.