Bold Property

Applies to TestComplete 15.70, last modified on December 17, 2024

Description

The Bold property specifies whether the text of a message to be posted to the test log will be displayed in bold font.

Declaration

FontStyleObj.Bold

Read-Write Property Boolean
FontStyleObj An expression, variable or parameter that specifies a reference to a FontStyle object

Applies To

The property is applied to the following object:

Property Value

True if the text of a message to be posted to the test log will be displayed in bold font, and False otherwise. The default value is False.

Example

The code below demonstrates how you can use the FontStyle.Bold property to specify the Bold font style for the messages posted to the test log when an unexpected window appears.

JavaScript, JScript

function EventControl1_OnUnexpectedWindow(Sender, Window, LogParams)
{
  LogParams.MessageText = "An unexpected window has appeared.";
  // Specifies the font style
  LogParams.FontStyle.Bold = true;
   ...
}

Python

def EventControl1_OnUnexpectedWindow(Sender, Window, LogParams):
  LogParams.MessageText = "An unexpected window has appeared."
  # Specifies the font style
  LogParams.FontStyle.Bold = True
  # ...

VBScript

Sub EventControl1_OnUnexpectedWindow(Sender, Window, LogParams)

  LogParams.MessageText = "An unexpected window has appeared."
  ' Specifies the font style
  LogParams.FontStyle.Bold = True
   ...
  
End Sub

DelphiScript

function EventControl1_OnUnexpectedWindow(Sender, Window, LogParams);
begin
  LogParams.MessageText := 'An unexpected window has appeared.';
  // Specifies the font style
  LogParams.FontStyle.Bold := True;
  ...
end;

C++Script, C#Script

function EventControl1_OnUnexpectedWindow(Sender, Window, LogParams)
{
  LogParams["MessageText"] = "An unexpected window has appeared.";
  // Specifies the font style
  LogParams["FontStyle"]["Bold"] = true;
   ...
}

See Also

FontStyle Object

Highlight search results