SetGadgetFont()
Syntax
SetGadgetFont(#Gadget, FontID)Description
Changes the font of the specified gadget.
Parameters
#Gadget The gadget to use. If this parameter is set to #PB_Default, the font used by newly created gadgets is changed. FontID The font to set. The FontID() function can be used to easily obtain a valid FontID. If this parameter is set to #PB_Default, then the system default font will be used.
Return value
None.
Example
If OpenWindow(0, 0, 0, 222, 130, "SetGadgetFont", #PB_Window_ScreenCentered) LoadFont(0, "Arial", 16) LoadFont(1, "Times", 16) ButtonGadget(0, 10, 10, 200, 30, "Arial 16") SetGadgetFont(0, FontID(0)) ButtonGadget(1, 10, 50, 200, 30, "Times 32") SetGadgetFont(1, FontID(1)) TextGadget(2, 10, 90, 200, 40, "Default font", #PB_Text_Center) EndIf
See Also
FontID(), LoadFont()
Supported OS
All