Hi folks,
unfortunately, Gnozals PureColorLib no longer works (since PB5.40).
With the PureCOLOR_SetGadgetColor(GadgetNumber.l, TextColor.l, BackColor.l)
command, I could change the Colors of many gadgets which are not supported by
SetGadgetColor() like:
+ FrameGadget ()
+ PanelGadget ()
+ ComboBoxGadget()
+ ScrollBarGadget()
/EDIT/
+ TrackBarGadget ()
Does anybody knows, what Gnozal has used for that command? Is it
possible to decode a tailbited lib?
If anybody have used the PureLVSORT Lib, you'll find here an
replacement: http://www.purebasic.fr/english/viewtop ... 5&start=15
Ciao dige
PureCOLOR_SetGadgetColor () Replacement?
PureCOLOR_SetGadgetColor () Replacement?
Last edited by dige on Sat Nov 14, 2015 4:56 pm, edited 1 time in total.
"Daddy, I'll run faster, then it is not so far..."
-
IdeasVacuum
- Always Here

- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: PureCOLOR_SetGadgetColor () Replacement?
Hi dige - some of it, such as ListIcon row/cell colour is done natively by PB now, so as you say, there is just a short list of gadgets not supported by SetGadgetColor(). No doubt Gnozal was using Windows API. It's an area of the API that requires a huge amount of code to achieve tiny changes.
Of potential interest:
Scrollbar Gadget [Shardik]
Frame Gadget [Danilo]
Frame Gadget [Fluid Byte] ;Preserves Theme
Combo Box Gadget [bbanelli]
Panel Gadget Tabs [Sparkie]
Of potential interest:
Scrollbar Gadget [Shardik]
Frame Gadget [Danilo]
Frame Gadget [Fluid Byte] ;Preserves Theme
Combo Box Gadget [bbanelli]
Panel Gadget Tabs [Sparkie]
Last edited by IdeasVacuum on Sun Nov 15, 2015 1:09 am, edited 1 time in total.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
- Kwai chang caine
- Always Here

- Posts: 5528
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: PureCOLOR_SetGadgetColor () Replacement?
Justly, often i wonder why buttongadget, FrameGadget, CheckBox can't use SetGadgetColor in PB ?? 
Microsoft not expected this option about it ?
Microsoft not expected this option about it ?
The happiness is a road...Not a destination
Re: PureCOLOR_SetGadgetColor () Replacement?
@IdeasVacuum thx.
It's a pity to have to replace a single command by several codes..
Is'nt it possible to find out, what have Gnozal used for hier PureCOLOR_SetGadgetColor () command?
Btw., it also worked for the TrackBarGadget()...
It's a pity to have to replace a single command by several codes..
Is'nt it possible to find out, what have Gnozal used for hier PureCOLOR_SetGadgetColor () command?
Btw., it also worked for the TrackBarGadget()...
"Daddy, I'll run faster, then it is not so far..."
-
IdeasVacuum
- Always Here

- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: PureCOLOR_SetGadgetColor () Replacement?
Well, 'under the hood', most likely there are several Procedures, invoked like this:
[/size]
Code: Select all
Procedure SetGadgetColor(iGadgetID.i, iTextColourRGB.i, iBackColourRGB.i)
;#-----------------------------------------------------------------------
Protected iGadgetType.i = GadgetType(iGadgetID)
Select iGadgetType
Case #PB_GadgetType_ComboBox: SetComboBoxColours(iGadgetID, iBackColourRGB, iTextColourRGB, Transparency.i = #TRANSPARENT)
Case #PB_GadgetType_Frame: SetFrameColours(iGadgetID, iBackColourRGB, iTextColourRGB) ;Border Colour = Text Colour
;etc etc
EndSelect
EndProcedureIdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
-
IdeasVacuum
- Always Here

- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: PureCOLOR_SetGadgetColor () Replacement?
It can be done with Windows API, so I imagine the issue is not Microsoft but how to do it cross-platform.Microsoft not expected this option about it ?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
- Kwai chang caine
- Always Here

- Posts: 5528
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: PureCOLOR_SetGadgetColor () Replacement?
Thanks IdeasVacuum for your explanation 
It's right, like i use always windows i never think to that
But they are several PB function, with this observation "use only with windows"
When even, have a button in color in 2015, and all this big splendid library of 3D, it's not a big request no ??
It's right, like i use always windows i never think to that
But they are several PB function, with this observation "use only with windows"
When even, have a button in color in 2015, and all this big splendid library of 3D, it's not a big request no ??
The happiness is a road...Not a destination
-
IdeasVacuum
- Always Here

- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: PureCOLOR_SetGadgetColor () Replacement?
I think PB really needs a GUI designer that is more comprehensive and flexible. I dislike QT because it is way too expensive, but it does show how GUI graphics should be.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
