Page 1 of 1

Can i change color and font of a specific object with gID?

Posted: Mon Apr 06, 2020 5:04 am
by skinkairewalker
Can i change the color and font of a specific object with GadgetID?

example >

Code: Select all

If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_ScreenCentered)
  TextGadget(1, 10, 10, 480, 380, "Frame", 0)
  StringGadget(2, 20, 30, 200, 20, "", 0)
  ButtonGadget(3, 230, 30, 100, 20, "Button", 0)
 
  SetGadgetColor(1, RGB(255, 0, 0))
  SetGadgetStyle(1, "15px time")
 
 SetGadgetColor(2, RGB(255, 255, 0))
  SetGadgetStyle(2, "30px time")

  SetGadgetColor(3, RGB(0, 255, 0))
  SetGadgetStyle(3, "12px roman")

EndIf

Re: Can i change color and font of a specific object with gI

Posted: Mon Apr 06, 2020 5:39 am
by Peter
to change the Color: see SetGadgetColor()

to change the Font: see SetGadgetFont()

Greetings ... Peter

Re: Can i change color and font of a specific object with gI

Posted: Sun Nov 01, 2020 7:56 pm
by skinkairewalker
thanks again Peter :D