Page 1 of 1

Gadget setup question

Posted: Sat Apr 20, 2013 8:48 pm
by PhilR1
Why does this work . ..

If OpenWindow(0, 0, 0, 270, 160, "TextGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
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
Delay (5000)
EndIf

And this only shows a blank window (for 5 seconds) . . ..

If OpenWindow(0, 0, 0, 270, 160, "TextGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
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
Delay (5000)
EndIf

I don't see any references to checking for window events being required to display a textgadget.

Thanks.

Re: Gadget setup question

Posted: Sat Apr 20, 2013 8:50 pm
by ts-soft
Checking Events is required for all gadgets and windows, allways on all OS.

Re: Gadget setup question

Posted: Sun Apr 21, 2013 12:24 am
by rrpl
On mine it displays the window with text gadgets for 5 seconds then ends as expected [Purebasic version 5.11 on WindowsXP(SP3)].