TextSetStrikethrough

Syntax

TextSetStrikethrough(Text, IsStrikethrough.b)

Description

Enables or disables the strikethrough decoration for the entire text content of the specified text object.

Parameters

Text
The handle of the text object to modify.

IsStrikethrough.b
Set to #True to enable strikethrough, or #False to disable it.

Return Value

This function does not return a value.

Remarks

This applies a horizontal line through the middle of the text. The appearance of the strikethrough line itself (thickness, color) is typically determined by the font and rendering engine.

Example

IncludeFile "ProGUI_PB.pbi"

StartProGUI()

Global MyText

Procedure DrawHandler(Window, EventType, *EventData.PG_EventDraw)
    DrawClear(RGB(240, 240, 240), 1)
    DrawTxt(MyText, 10, 10, 0)
EndProcedure

MyWindow = CreateWindow(0, 0, 200, 100, "Text Strikethrough")

If MyWindow
    MyText = CreateText("Strikethrough Me", "Arial", 14)
    TextSetStrikethrough(MyText, #True) ; Enable strikethrough

    AddEventHandler(MyWindow, #PG_Event_Draw, @DrawHandler())
    WindowShow(MyWindow, #True, #PG_Window_ScreenCentered)
    Repeat: Event = WaitWindowEvent() : Until Event = #PB_Event_CloseWindow
    FreeText(MyText)
EndIf

StopProGUI()

See Also

CreateText, TextGetStrikethrough, TextSetUnderline

Supported OS

Windows, Linux