TE Edit Control Java / HTML-JavaScript Help
Product page

SetTerDefaultFont

Set the default font and pointsize

boolean SetTerDefaultFont( typeface, PointSize, style, color, repaint)
boolean SetTerDefaultFontHtml( typeface, PointSize, style, HtmlColor, repaint)
String typeface;typeface of the default font
int PointSize;Point size for the default font. You can also specify the font size in twips by specifying a negative value (1 point equal 20 twips)
int style;style of the default font. Refer to the SetTerCharStyle function for a list of style constants. Use 0 for default.
Color color;default text color. Use 0 for default.
String HtmlColor;Color specified in the html String format, such as "red", "#FFFFFF"
boolean repaint;true to refresh the window after this operation

Description: This function is used by an application to change the initial or default font for the editor. Any text that used the previous default font now gets printed with the new font, point size, style and color.

Return Value: This function returns true if successful.

Example:

          // use Arial typeface and 12 pointsize for default.
          SetTerDefaultFont("Arial",12, Color.red, true);  
          // use Arial typeface and 12 pointsize
          SetTerDefaultFont("Arial",-240,Color.red, true);