Skip to content

GadgetText

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

GadgetText

GadgetText:String gadget:Int32
Parameter Mode Type Default Description
gadget In Int32 required Handle of the gadget.

Returns: The text of the gadget.

Description

Reads the text of a gadget, such as the caption of a button or label, or the title of a window. For text fields and text areas, use TextFieldText and TextAreaText to read what the user typed. The official help lists the command as undocumented.

Examples

Graphics 320, 240, 32, 2
win = CreateWindow("Text", 10, 10, 300, 100, Desktop(), 3)
b   = CreateButton("Hello", 10, 10, 120, 28, win)
Repeat
	e = WaitEvent()
	If e = $401 Then SetGadgetText win, GadgetText(b) + " again"
Until e = $803

Related Commands

GadgetFont, GadgetGroup, GadgetHeight, GadgetItemText, GadgetWidth, GadgetX, GadgetY, SetGadgetText

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally