Skip to main content
Open topic with navigation CAPL Functions » General » Function Overview » writeTextColor

writeTextColor

Valid for: CANoe DE • CANoe:lite DE • CANoe4SW DE • CANoe4SW:lite DE

Function Syntax

void writeTextColor(dword sink, dword red, dword green, dword blue);

Description

Sets the color for text of the specified page in the Write Window. You can use the following constants for the target identifier:
// write sinks
dword WRITE_SYSTEM = 0;
dword WRITE_CAPL = 1;
In addition, you can use one of the target identifiers returned by the function writeCreate. The color settings have also an effect on the All tab of the Write Window.

Parameters

  • sink: The target identifier of the page on which the color settings should have an effect.
  • red: Specifies the intensity of the red color.
  • green: Specifies the intensity of the green color.
  • blue: Specifies the intensity of the blue color.

Return Values

Example

WriteTextColor(0, 255, 0, 0);
WriteLineEx(0, 1, "This is red text");

WriteTextBkgColor(0, 0, 255, 0);
WriteLineEx(0, 1, "This is red text with green background");

WriteTextColor(0, 0, 0, 0);
WriteTextBkgColor(0, 255, 255, 255);
WriteLineEx(0, 1, "This is black text with white background");
writewriteCreatewriteClearwriteDestroywriteExwriteLineExwriteTextBkgColor