Stringgadget is not working with Windowed Screen
Posted: Sat Dec 18, 2004 4:19 pm
Stringgadget is not working in combination with Windowed Screen.
Please help!
Please help!
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
OpenWindow(0,0,0,400,400,#PB_Window_SystemMenu | #PB_Window_ScreenCentered,"Test")
InitSprite()
OpenWindowedScreen(WindowID(),5,5,390,355,0,0,0)
CreateGadgetList(WindowID())
StringGadget(0,10,370,390,20,"This is working - change the text and see")
string$=GetGadgetText(0)
Repeat
Repeat
ev=WindowEvent()
Select ev
Case #PB_Event_CloseWindow
End
Case #PB_Event_Gadget
If EventGadgetID()=0
string$=GetGadgetText(0)
EndIf
EndSelect
Until ev=0
ClearScreen(0,0,0)
StartDrawing(ScreenOutput())
Locate(Random(390-TextLength(string$)),Random(355))
DrawingMode(1)
FrontColor(Random(255),Random(255),Random(255))
DrawText(string$)
StopDrawing()
FlipBuffers()
Delay(15)
ForEver