How to refresh display after changing font size ?

SyntaxEditor for Windows Forms Forum

Posted 16 years ago by Paul Fuller
Avatar
Hi,

I have a font editor dialog (not the built-in one) that allows users to change the font (family, size etc) on a variety of HighlightingStyle objects that are used by the editor. After this is invoked and a change is made I return to the editor but there is a glitch.

If for example the user changes from Consolas 10 point to Consolas 16 point, the editor now displays the text in the larger size but the character spacing still appears to be calculated from the original size. Each text range with a given style is rendered within the original rectangle but is obviously clipped.

Changing font size from larger to small has the opposite effect but now with lots of space around the smaller characters.

Have tried Refresh() and similar on the editor control with no effect.

The problem is resolved if I switch to a different document and then back.

Any suggestions for how to force the editor to update with the new font settings ?

Thanks,

Paul

Comments (2)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Paul,

Are you wrapping your updates with SyntaxLanguage.Isupdating = true and a related false after the update?


Actipro Software Support

Posted 16 years ago by Paul Fuller
Avatar
I am now.

Thanks.
The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.