TE Edit Control Java / HTML-JavaScript Help
Product page

SetTerColor

Set text color

boolean SetTerColor( color, repaint)

Color color;

String HtmlColor;

new color to apply.

The color value can be passed as a Color object, or an HTML color string such as red, "#ff0000".

boolean repaint;true to refresh the window after this operation

Description: This function is used to apply the new color to the text. If a text block is highlighted, this operation is applicable to all characters in the block. Otherwise the new color is selected for the next character input.

Return Value: This function returns true if successful.

Example:

tej.SelectTerText(0,0,0,40,false); // select the first 40 characters of the first line.

tej.SetTerColor(Color.Green,true); // apply green color to the selected text