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

Just starting out? Need help? Post your questions and find answers here.
skinkairewalker
Posts: 120
Joined: Tue Jun 14, 2016 7:17 pm

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

Post 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
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

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

Post by Peter »

to change the Color: see SetGadgetColor()

to change the Font: see SetGadgetFont()

Greetings ... Peter
skinkairewalker
Posts: 120
Joined: Tue Jun 14, 2016 7:17 pm

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

Post by skinkairewalker »

thanks again Peter :D
Post Reply