Page 1 of 1

color

Posted: Mon Dec 28, 2015 5:15 pm
by t57042
probably stupid, but i don't see why the colors don't change

Code: Select all

OpenWindow(0,0,0,890,700,"",#PB_Window_ScreenCentered|#PB_Window_SystemMenu)

        LoadFont(2, "tahoma", 40,#PB_Font_Bold|#PB_Font_Italic )          
    TextGadget(990, 100, 200, 700,500, "LAURIE ",#PB_Text_Center)
    SetGadgetFont(990, FontID(2)) 
    SetGadgetColor(990, #PB_Gadget_BackColor,$00ff00)
    SetGadgetColor(990, #PB_Gadget_FrontColor, $FF0000)
    
   Delay(1000)
   

Re: color

Posted: Mon Dec 28, 2015 5:22 pm
by Keya
because you're not allowing the main message loop to process GUI messages (because you haven't provided one) :)
simply replace Delay with an event processing loop such as:

Code: Select all

 Repeat
      Event = WaitWindowEvent()
 Until Event = #PB_Event_CloseWindow

Re: color

Posted: Mon Dec 28, 2015 5:46 pm
by TI-994A
Keya's right. Try it like this:

Code: Select all

OpenWindow(0, 0, 0, 890, 700, "", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)

LoadFont(2, "tahoma", 40, #PB_Font_Bold | #PB_Font_Italic)          
TextGadget(990, 100, 200, 700, 500, "LAURIE ", #PB_Text_Center)
SetGadgetFont(990, FontID(2)) 
SetGadgetColor(990, #PB_Gadget_BackColor, $00ff00)
SetGadgetColor(990, #PB_Gadget_FrontColor, $FF0000)

While WaitWindowEvent() ! #PB_Event_CloseWindow : Wend