Page 1 of 1

pannel gadgets and purecolor

Posted: Thu Jan 19, 2006 9:40 pm
by rlumley
I can't seem to get a pannel to color with setgadgetcolor()? any ideas?

Posted: Fri Jan 20, 2006 9:17 am
by gnozal
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

Posted: Fri Jan 20, 2006 1:01 pm
by ts-soft
Only with XP-Style disabled!

Posted: Fri Jan 20, 2006 1:36 pm
by gnozal
ts-soft wrote:Only with XP-Style disabled!
That's quite possible, but I don't have XP, and if I would, I would not use any style/skin/bloat stuff.
If M$ doesn't follow it's own rules (API)...