Skip to content

SetGadgetFont

Narta Xaymar Dirks edited this page Oct 28, 2026 · 6 revisions
BlitzPlus

SetGadgetFont

SetGadgetFont:Void gadget:Int32, font:Int32
Parameter Mode Type Default Description
gadget In Int32 required Handle of the gadget.
font In Int32 required Font handle from LoadFont or RequestFont.

Description

Makes a gadget draw its text with another font.

Differences

  • The gadget is drawn with the typeface of the font, and its text is measured in the widths of that font. A font that was not found on the system is drawn with the built-in bitmap font in the size that was asked for.

Examples

Graphics 320, 240, 32, 2
win = CreateWindow("Fonts", 10, 10, 300, 140, Desktop(), 3)
big = LoadFont("Arial", 20)
lab = CreateLabel("Big text", 10, 10, 250, 40, win)
SetGadgetFont lab, big
Repeat
Until WaitEvent() = $803

Media

SetGadgetFont

Related Commands

GadgetFont, SetButtonState, SetGadgetLayout, SetGadgetShape, SetGadgetText, SetPanelColor, SetPanelImage, SetSliderRange

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally