Italic Property

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

Description

The Italic property specifies whether the text of a message to be posted to the test log will be displayed in italic.

Declaration

FontStyleObj.Italic

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 italic, and False otherwise. The default value is False.

Example

The code below demonstrates how you can use the FontStyle.Italic property to specify the Italic 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.Italic = true;
   ...
}

Python

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

VBScript

Sub EventControl1_OnUnexpectedWindow(Sender, Window, LogParams)

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

DelphiScript

function EventControl1_OnUnexpectedWindow(Sender, Window, LogParams);
begin
  LogParams.MessageText := 'An unexpected window has appeared.';
  // Specifies the font style
  LogParams.FontStyle.Italic := 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"]["Italic"] = true;
   ...
}

See Also

FontStyle Object

Highlight search results