pannel gadgets and purecolor
pannel gadgets and purecolor
I can't seem to get a pannel to color with setgadgetcolor()? any ideas?
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
From the examples (in %Purebasic%\Examples\PureCOLOR) :
Code: Select all
; -------------------------------------------
;
; PureCOLOR test file 15
;
; -------------------------------------------
;
Enumeration
#gFrame
#gPanel
#gPanelB1
#gPanelB2
#gContainer
#gContainerExplorer
EndEnumeration
;
OpenWindow(0, 303, 182, 347, 300, #PB_Window_SystemMenu|#PB_Window_MaximizeGadget|#PB_Window_MinimizeGadget|#PB_Window_ScreenCentered, "PureCOLOR : PanelGadget demo")
CreateGadgetList(WindowID(0))
Frame3DGadget(#gFrame, 5, 5, 335, 75, "Frame3D Gadget", #PB_Frame3D_Single)
PanelGadget(#gPanel, 5, 85, 335, 100)
AddGadgetItem(#gPanel,-1,"Panel Gadget - 1")
ButtonGadget(#gPanelB1,5,5,320,22,"Button inside Panel Gadget - 1")
AddGadgetItem(#gPanel,-1,"Panel Gadget - 2")
ButtonGadget(#gPanelB2,5,5,320,22,"Button inside Panel Gadget - 2")
CloseGadgetList()
ContainerGadget(#gContainer,5,190,335,105,#PB_Container_Flat)
ExplorerTreeGadget(#gContainerExplorer,5,5,325,95,"c:\")
CloseGadgetList()
;
PureCOLOR_SetGadgetColor(#gPanel, #Yellow, #Blue)
PureCOLOR_SetGadgetColor(#gContainer, #Yellow, #Black)
PureCOLOR_SetGadgetColor(#gContainerExplorer, #Black, #Red)
PureCOLOR_SetGadgetColorEx(#gContainerExplorer, #Black, #Red, 0, #PureCOLOR_TV_NodeLevel1)
PureCOLOR_SetGadgetColorEx(#gContainerExplorer, #Black, #Red, 0, #PureCOLOR_TV_NodeLevel2)
PureCOLOR_SetGadgetColorEx(#gContainerExplorer, #Black, #Red, 0, #PureCOLOR_TV_NodeLevel3)
PureCOLOR_SetGadgetColorEx(#gContainerExplorer, #Black, #Red, 0, #PureCOLOR_TV_NodeLevel4)
PureCOLOR_SetButtonColor(#gPanelB1, #Blue, #Red)
PureCOLOR_SetButtonColor(#gPanelB2, #Yellow, #Black)
PureCOLOR_SetWindowColor(0, #Blue)
;
Repeat
Select WaitWindowEvent()
Case #PB_EventCloseWindow
Break
EndSelect
Until WaitWindowEvent()=#PB_EventCloseWindow
;
End
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Only with XP-Style disabled!
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
That's quite possible, but I don't have XP, and if I would, I would not use any style/skin/bloat stuff.ts-soft wrote:Only with XP-Style disabled!
If M$ doesn't follow it's own rules (API)...
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).