Page 1 of 1

Setting Button color

Posted: Fri Apr 14, 2023 11:09 pm
by Songdog
So I start the IDE, add a form then put a button on the form. How do I set the Button color? :?

Re: Setting Button color

Posted: Sat Apr 15, 2023 1:23 am
by mk-soft
The changes of button colours are not supported by the operating system.

Search the forum for alternatives.
or

Code: Select all

If OpenWindow(0, 0, 0, 200, 60, "ButtonImageGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) 
  If LoadImage(0,  #PB_Compiler_Home + "/Examples/Sources/Data/PureBasic.bmp")    ; change 2nd parameter to the path/filename of your image
    ButtonImageGadget(0, 10, 10, 180, 50, ImageID(0))
  EndIf
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf