TextGadget()
Syntax
Result = TextGadget(#Gadget, x, y, Width, Height, Text$ [, Flags])Description
Creates a Text gadget in the current GadgetList. If #PB_Any is used as '#Gadget' parameter, the new gadget number will be returned as 'Result'. A TextGadget is a basic text area for displaying, not entering, text.
The content can be changed with the command SetGadgetText() and can be obtained with GetGadgetText(). The font of a TextGadget() you easily change with SetGadgetFont().
'Flags' are always optional and can be composed of one of the following constants:#PB_Text_Center : The text is centered in the gadget. #PB_Text_Right : The text is right aligned. #PB_Text_Border : A sunken border is drawn around the gadget.This gadget supports the SetGadgetColor() and GetGadgetColor() commands with the following values as 'ColorType':#PB_Gadget_FrontColor: Textcolor #PB_Gadget_BackColor : BackgroundcolorNote: This Gadget doesn't receive any user events, and GadgetToolTip() can't be used with it.
Example:If OpenWindow(0, 0, 0, 270, 160, "TextGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) And CreateGadgetList(WindowID(0)) TextGadget(0, 10, 10, 250, 20, "TextGadget Standard (Left)") TextGadget(1, 10, 70, 250, 20, "TextGadget Center", #PB_Text_Center) TextGadget(2, 10, 40, 250, 20, "TextGadget Right", #PB_Text_Right) TextGadget(3, 10, 100, 250, 20, "TextGadget Border", #PB_Text_Border) TextGadget(4, 10, 130, 250, 20, "TextGadget Center + Border", #PB_Text_Center|#PB_Text_Border) Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow EndIf
Supported OS
All