StrikeOut Property

Applies to TestComplete 14.0, last modified on January 23, 2019

Description

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

Declaration

FontStyleObj.StrikeOut

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 strikeout, and False otherwise.

Example

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

Python

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

VBScript

Sub EventControl1_OnUnexpectedWindow(Sender, Window, LogParams)

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

DelphiScript

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

See Also

FontStyle Object

Highlight search results