Syntax
TextSetUnderline(Text, IsUnderline.b)
Description
Enables or disables the underline decoration for the entire text content of the specified text object.
Parameters
Text
The handle of the text object to modify.
IsUnderline.b
Set to #True to enable underlining, or
#False to disable it.
Return Value
This function does not return a value.
Remarks
This applies a line below the text baseline. The appearance of the underline itself (thickness, position, 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 Underline")
If MyWindow
MyText = CreateText("Underlined Text", "Arial", 14)
TextSetUnderline(MyText, #True) ; Enable underline
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, TextGetUnderline, TextSetStrikethrough
Supported OS
Windows, Linux