restyleText

restyleText(): Integer;

The restyleText method of the JadeTextEdit class clears all styling information from the text editor then recalculates the styling of the text using the current language setting. Call this method to recalculate text styles and fold points after changing the programming language. This method returns zero (0).

Calling this method without changing the current language has the useful side effect of expanding all collapsed fold points.

The code fragment in the following example shows the use of the restyleText method to display the text with highlighting defined by a newly selected language.

jteSource.language := JadeTextEdit.SCLEX_CPP;
jteSource.applySettings();
jteSource.restyleText();