Setting Button color

Just starting out? Need help? Post your questions and find answers here.
Songdog
New User
New User
Posts: 5
Joined: Wed Apr 12, 2023 4:13 pm

Setting Button color

Post by Songdog »

So I start the IDE, add a form then put a button on the form. How do I set the Button color? :?
User avatar
mk-soft
Always Here
Always Here
Posts: 6246
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Setting Button color

Post 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
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Post Reply