Underline Property

Applies to TestComplete 15.63, last modified on April 10, 2024

Description

The Underline property specifies whether the text of a message to be posted to the test log will be displayed underlined.

Declaration

FontStyleObj.Underline

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

Example

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

Python

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

VBScript

Sub EventControl1_OnUnexpectedWindow(Sender, Window, LogParams)

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

DelphiScript

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

See Also

FontStyle Object

Highlight search results