A very simple SetGadgetColorEx() function [Windows]
Re: A very simple SetGadgetColorEx() function [Windows]
The code in the first post has been updated.
The FrameGadget now reacts to its creation flags (#PB_Frame_Single, #PB_Frame_Double, #PB_Frame_Flat or #PB_Frame_Container). Drawing a big contener is far faster.
The FrameGadget now reacts to its creation flags (#PB_Frame_Single, #PB_Frame_Double, #PB_Frame_Flat or #PB_Frame_Container). Drawing a big contener is far faster.
Re: A very simple SetGadgetColorEx() function [Windows]
The code in the first post has been updated again.
• The PanelGadget has now colorized arrows (when there is too much panels to see all of them). See the picture of the first post of this subject.
• A new 'ApplyColorsToAllGadgets(WindowNum, FrontColor, BackColor)' function allows you to colorize all the gadgets of a window with a simple line.
• The 'SetGadgetColorEx()' procedure is more rational and simple.
• The PanelGadget has now colorized arrows (when there is too much panels to see all of them). See the picture of the first post of this subject.
• A new 'ApplyColorsToAllGadgets(WindowNum, FrontColor, BackColor)' function allows you to colorize all the gadgets of a window with a simple line.
• The 'SetGadgetColorEx()' procedure is more rational and simple.
Re: A very simple SetGadgetColorEx() function [Windows]
A new big update of the code figuring in the first post:
- All gadgets are now fully colorized by the library (including ExplorerComboGadget, DateGadget and CalendarGadget).
- Hovered gadgets are highlighted.
- The overall operation is even faster.
Re: A very simple SetGadgetColorEx() function [Windows]
Thanks! It's very useful and easy to work with 

Re: A very simple SetGadgetColorEx() function [Windows]
Realy nice, that you come back to it, not only added color to the others gadgets,but also improved it. 

Re: A very simple SetGadgetColorEx() function [Windows]
And the library is still compact, even though she gained a little weightdcr3 wrote: Sun Feb 23, 2025 9:15 pmRealy nice, that you come back to it, not only added color to the others gadgets,but also improved it.

Thank you dcr3.
I just discovered some small issues with the ExplorerComboGadget and the DateGadget and CalendarGadget for older versions of Windows. A future release will fix this soon.
Re: A very simple SetGadgetColorEx() function [Windows]
ExplorerCombo, Calendar and Date gadgets had problems with some versions of Windows. That is now fixed.
The code in the first message of this subject has been updated.
The code in the first message of this subject has been updated.
Re: A very simple SetGadgetColorEx() function [Windows]
File not found

Code: Select all
XIncludeFile "../Références API/GetCallbackMessagesNames.pb"
Re: A very simple SetGadgetColorEx() function [Windows]
TextGadget of Container2 not show at first:
Code: Select all
IncludeFile "SetGadgetColorEx.pbi"
If OpenWindow(0, 400, 400, 200, 200, "PureBasic Window", #PB_Window_SystemMenu)
Define Container1=ContainerGadget(#PB_Any,10,10,180,180)
SetGadgetColor(Container1,#PB_Gadget_BackColor,#Red)
TextGadget(#PB_Any,10,10,160,80,"Container 1")
Define button1=ButtonGadget(1,10,100,140,20,"Go to Container2")
CloseGadgetList()
HideGadget(Container1,1)
Define Container2=ContainerGadget(#PB_Any,10,10,180,180)
SetGadgetColor(Container2,#PB_Gadget_BackColor,#Blue)
TextGadget(#PB_Any,10,10,160,80,"Container 2")
Define button2=ButtonGadget(2,10,100,140,20,"Go to Container1")
CloseGadgetList()
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_Gadget
Select EventGadget()
Case 1
HideGadget(Container1,1)
HideGadget(Container2,0)
Case 2
HideGadget(Container2,1)
HideGadget(Container1,0)
EndSelect
EndSelect
Until Event = #PB_Event_CloseWindow
EndIf
Re: A very simple SetGadgetColorEx() function [Windows]
Sorry for this thoughtlessness. This line should have been deleted. I just updated the file.Caronte3D wrote: Tue Feb 25, 2025 3:37 pm File not found![]()
Code: Select all
XIncludeFile "../Références API/GetCallbackMessagesNames.pb"
That's interresting! Thank's for that test idea. I'll work on it.Caronte3D wrote: Tue Feb 25, 2025 6:05 pm TextGadget of Container2 not show at first:Code: Select all
...
Re: A very simple SetGadgetColorEx() function [Windows]
It's fixed and the code has been updated.
Thanks again for this test!
Re: A very simple SetGadgetColorEx() function [Windows]
Code has been updated.
Due to a bug, the memory was not entirely cleaned when closing the gadget's window.
This is fixed whith the actual version (available in the first post of this subject).
Since there haven't been any bug reports for a while and I don't see what could be improved, I think we can consider this version as final (before the next one
).
Due to a bug, the memory was not entirely cleaned when closing the gadget's window.
This is fixed whith the actual version (available in the first post of this subject).
Since there haven't been any bug reports for a while and I don't see what could be improved, I think we can consider this version as final (before the next one
