And I think it's also true with all genuine functions... wherever possible and it exists !I am not recommending not to use PureCOLOR (I use it myself), but to use PB genuine functions whenever it's possible. Etc...

Moderator: gnozal
And I think it's also true with all genuine functions... wherever possible and it exists !I am not recommending not to use PureCOLOR (I use it myself), but to use PB genuine functions whenever it's possible. Etc...
Did you enable the 'UserLibThreadSafe' subsystem (see PureCOLOR.chm) ?SoS wrote:Hi gnozal
PureColor is not working in threadsafe mode.(winxp 32)
I get "unresolved external.... _PB_Stringbase".
gnozalgnozal wrote:I am not recommending not to use PureCOLOR (I use it myself), but to use PB genuine functions whenever it's possible.nigel wrote:I am still interested in understanding your reasons for recommending against the use of Purecolor. Is it just because it involves an external library and because you think the Purebasic author may eventually improve colour support natively within the language itself ?
Several reasons :
- PureCOLOR does not support themes (it could have better support for themes, but it would be a lot of work and I am not using themes anyway, so...)
- some PB gadgets are not 100% Windows API compatible, so using an external library for coloring may have some unexpected results : the listicon grid lines issue, the combobox coloring not working when #PB_ComboBox_Image is used, ....
I don't think the PB authors will improve color support a lot because most users use themes, and they have 3 OS to support. But I may be wrong.
PureFORM uses PureCOLOR internally because it's an old app written with PB3.9x which had absolutely no color support at the time, nor icon menus.
However, in the generated code, you can choose between PureCOLOR and the genuine SetGadgetColor() function, and this for every class. It may not be supported by PB though.
Yes.IdeasVacuum wrote:This is the first time I have really needed to colour gadgets. Really impressed with PureCOLOR, it's very easy to use and fast!![]()
Did you notice that applying colour to individual ListIcon cells results in the grid lines disappearing? Is there a way to get them to stay?
PureCOLOR.chm wrote:If the grid lines disappear, use this workaround : SendMessage_(GadgetID(#MyListIcon), #LVM_SETEXTENDEDLISTVIEWSTYLE, #LVS_EX_GRIDLINES, #LVS_EX_GRIDLINES)
No problem, you're welcome.IdeasVacuum wrote:Thanks for your reply gnozal. Somehow did not see the work-around in the help, sorry to trouble you.
Code: Select all
If OpenWindow(0, 0, 0, 120, 100, "ButtonImage", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If LoadImage(0, #PB_Compiler_Home + "Examples\Sources\Data\PureBasic.bmp") ; change 2nd parameter to the path/filename of your image
ButtonImageGadget(0, 10, 10, 100, 83, ImageID(0))
EndIf
DisableGadget(0, #TRUE)
PureCOLOR_SetButtonColor(0, #White, #Black)
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
New build uploaded (should not crash anymore).dige wrote:PureCOLOR_SetButtonColor(0, #White, #Black) PB4.6B3 crashes, if the ButtonImageGadget ()
is disabled.
Code: Select all
pWindow = OpenWindow(#PB_Any,0,0,10,10,"",#PB_Window_Invisible)
hWindow = OpenWindow(#PB_Any, 450, 200, 352, 62, "Having Fun", #PB_Window_Invisible|#PB_Window_SystemMenu,WindowID(pWindow))
hprog1 = ProgressBarGadget(#PB_Any, 6, 1, 340, 25, 0, 100, #PB_ProgressBar_Smooth)
hText1 = TextGadget(#PB_Any, 7, 3, 340, 20, "0%", #PB_Text_Center|#SS_CENTERIMAGE)
hProg2 = ProgressBarGadget(#PB_Any, 6, 31, 340, 25, 0, 100, #PB_ProgressBar_Smooth)
hText2 = TextGadget(#PB_Any, 5, 34, 340, 20, "0%", #PB_Text_Center|#SS_CENTERIMAGE)
SetGadgetFont(hText1, LoadFont(#Font_txt2, "Microsoft Sans Serif", 8, #PB_Font_Bold|#PB_Font_HighQuality))
SetGadgetFont(hText2, LoadFont(#Font_txt3, "Microsoft Sans Serif", 8, #PB_Font_Bold|#PB_Font_HighQuality))
PureCOLOR_SetGadgetColor(hText1, $FFFFFF, #PureCOLOR_DontSetBackColor)
PureCOLOR_SetGadgetColor(hText2, $FFFFFF, #PureCOLOR_DontSetBackColor)