Posted: Mon Jan 29, 2007 12:23 pm
Hello Gnozal, thanks for the quick reply... Sorry i haven't read the manual, i was used to the old coloring system. Thank you very much for the help!
http://www.purebasic.com
https://www.purebasic.fr/english/
Yesoridan wrote:With the PUREColor Lib, the MenuBar() is considered as a MenuItem().
This is bug?
Can't think of any right now, sorry.oridan wrote:A solution to my problem?
OK, I will wait! Thank you.gnozal wrote:Can't think of any right now, sorry.
Here is an example with a transparent checkbox :kinglestat wrote:I'm trying to use PureCOLOR to set transparent background to checkboxgadget and panelgadget.
Code: Select all
;{- Enumerations / DataSections
;{ Windows
Enumeration
#Window_0
EndEnumeration
;}
;{ Gadgets
Enumeration
#Window_0_CheckBox_0
EndEnumeration
;}
;}
Procedure OpenWindow_Window_0()
If OpenWindow(#Window_0, 439, 196, 400, 400, "Window_0", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar)
If CreateGadgetList(WindowID(#Window_0))
CheckBoxGadget(#Window_0_CheckBox_0, 88, 161, 238, 49, "Gadget_0")
; Gadget Colors
PureCOLOR_SetGadgetColor(#Window_0_CheckBox_0, #PureCOLOR_SystemColor, #PureCOLOR_DontSetBackColor)
; Window Backcolor
PureCOLOR_SetWindowColor(#Window_0, $FF)
EndIf
EndIf
EndProcedure
OpenWindow_Window_0()
;{- Event loop
Repeat
Event = WaitWindowEvent()
Select Event
; ///////////////////
Case #PB_Event_Gadget
EventGadget = EventGadget()
EventType = EventType()
If EventGadget = #Window_0_CheckBox_0
EndIf
; //////////////////////
Case #PB_Event_CloseWindow
EventWindow = EventWindow()
If EventWindow = #Window_0
CloseWindow(#Window_0)
Break
EndIf
EndSelect
Forever
;
;}
If the listicon receives the #LVM_DELETEALLITEMS message, the gadget colors are cleared.Pantcho!! wrote:I have loaded a PB 3.94 source code and i don't remember if i updated my PureColor Lib but as i checked it seems i have the latest.
when you update the ListIconGadget the whole setting is going back to default.
!?Pantcho!! wrote:I never used that flag.
Even when i add a new item (a new row) to the gadget
boom the colors returns to default.
Code: Select all
;{- Enumerations / DataSections
;{ Windows
Enumeration
#Window_0
EndEnumeration
;}
;{ Gadgets
Enumeration
#ListIcon_0_Gadget0
EndEnumeration
;}
;}
Procedure OpenWindow_Window_0()
If OpenWindow(#Window_0, 450, 200, 400, 400, #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar, "Window_0")
If CreateGadgetList(WindowID(#Window_0))
ListIconGadget(#ListIcon_0_Gadget0, 11, 5, 382, 382, "Gadget_0", 100, #PB_ListIcon_AlwaysShowSelection|#PB_ListIcon_GridLines|#PB_ListIcon_FullRowSelect)
AddGadgetItem(#ListIcon_0_Gadget0, -1, "line 1")
AddGadgetItem(#ListIcon_0_Gadget0, -1, "line 2")
AddGadgetItem(#ListIcon_0_Gadget0, -1, "line 3")
AddGadgetItem(#ListIcon_0_Gadget0, -1, "line 4")
SendMessage_(GadgetID(#ListIcon_0_Gadget0), #LVM_SETCOLUMNWIDTH, 0, #LVSCW_AUTOSIZE_USEHEADER)
; Gadget Colors
PureCOLOR_SetGadgetColorEx(#ListIcon_0_Gadget0, #PureCOLOR_SystemColor, $8000, $80FF, #PureCOLOR_LV_AlternateColors)
EndIf
EndIf
EndProcedure
OpenWindow_Window_0()
;ClearGadgetItemList(#ListIcon_0_Gadget0) ; color is cleared
AddGadgetColumn(#ListIcon_0_Gadget0, 1, "New column", 100) ; color is not cleared
AddGadgetItem(#ListIcon_0_Gadget0, -1, "line 5") ; color is not cleared
;{- Event loop
Repeat
Event = WaitWindowEvent()
Select Event
; ///////////////////
Case #PB_Event_Gadget
EventGadget = EventGadgetID()
EventType = EventType()
If EventGadget = #ListIcon_0_Gadget0
EndIf
; //////////////////////
Case #PB_Event_CloseWindow
EventWindow = EventWindowID()
If EventWindow = #Window_0
CloseWindow(#Window_0)
Break
EndIf
EndSelect
ForEver
;
;}
Probablykinglestat wrote:Hi gnozal
I figured out the problem
If I turn off "XP Skin support", it comes out transparent
Is there an incompatibility with XP skins ?
Did you try PureCOLOR_TEST_10.pb in your \Examples\PureCOLOR directory ?kinglestat wrote:Is there or can somebody provide an example using the PureCOLOR_SetGadgetColorEx function with #PureCOLOR_BackgroundImage as I only managed to crash with trying it out