PureCOLOR library : coloring gadgets (and much more)

All PureFORM, JaPBe, Libs and useful code maintained by gnozal

Moderator: gnozal

gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: PureCOLOR library : coloring gadgets (and much more)

Post by gnozal »

kurzer wrote:I found a strange bug using PureColor and font-enabling for gadgets.
No problem with PB4.3x, so I assume it's related to the new 2DDrawing library.
I'm on it.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: PureCOLOR library : coloring gadgets (and much more)

Post by gnozal »

Update v14.07 (PB4.40 version)

Changes :
- this build should fix the multiline button issue posted by kurzer
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Kurzer
Enthusiast
Enthusiast
Posts: 666
Joined: Sun Jun 11, 2006 12:07 am
Location: Near Hamburg

Re: PureCOLOR library : coloring gadgets (and much more)

Post by Kurzer »

Incredibly support! Thank you very much.
It works perfectly now.
PB 6.02 x64, OS: Win 7 Pro x64 & Win 11 x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age in 2024: 56y
"Happiness is a pet." | "Never run a changing system!"
User avatar
Kurzer
Enthusiast
Enthusiast
Posts: 666
Joined: Sun Jun 11, 2006 12:07 am
Location: Near Hamburg

Re: PureCOLOR library : coloring gadgets (and much more)

Post by Kurzer »

Hello Gnozal,

unfortunately I stumbled over another Pure_COLOR issue (which took me hours today :| )

Try this code, please:

Code: Select all

  If OpenWindow(0, 0, 0, 300, 300, "SetGadgetItemColor", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
		SmartWindowRefresh(0, 1)
    LI=ListIconGadget(#PB_Any, 10, 50, 280, 280, "Column 0", 100)
		
    AddGadgetColumn(LI, 1, "Column 1", 100)
    For i = 1 To 10
      AddGadgetItem(LI, -1, "Text 1"+Chr(10)+"Text 2")
    Next 
        
		BT=ButtonGadget(#PB_Any, 10, 10, 100, 30, "123")
;		PureCOLOR_SetButtonColor(BT, $aaaa00, $8BEC84)

    SetGadgetItemColor(LI, -1, #PB_Gadget_FrontColor, $0000FF,  1)
    SetGadgetItemColor(LI,  3, #PB_Gadget_BackColor,  $00FFFF, -1)    
    SetGadgetItemColor(LI,  9, #PB_Gadget_BackColor,  $FFFF00,  1)    

    Repeat
    Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf
After removing the comment, which means the button will be coloured, then the SetGadgetItemColor() will not longer work.
It is not possible to highlight ListIcon rows, if you use PureCOLOR at the same time.

-> PB 4.40/4.41RC1, Win XP Home SP3
PB 6.02 x64, OS: Win 7 Pro x64 & Win 11 x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age in 2024: 56y
"Happiness is a pet." | "Never run a changing system!"
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: PureCOLOR library : coloring gadgets (and much more)

Post by gnozal »

kurzer wrote:unfortunately I stumbled over another Pure_COLOR issue (which took me hours today :| )
It is not possible to highlight ListIcon rows, if you use PureCOLOR at the same time.
-> PB 4.40/4.41RC1, Win XP Home SP3
I just tested your code.
I can confirm the problem with PB4.41, however it works perfectly with PB4.00-PB4.31 ...!
I think it's a window subclassing issue.
Will see....
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: PureCOLOR library : coloring gadgets (and much more)

Post by gnozal »

Update v14.08 (PB4.40 version)

Changes :
- this build should fix the listicon issue posted by kurzer
  (hopefully it doesn't break something else...)
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Kurzer
Enthusiast
Enthusiast
Posts: 666
Joined: Sun Jun 11, 2006 12:07 am
Location: Near Hamburg

Re: PureCOLOR library : coloring gadgets (and much more)

Post by Kurzer »

Thank you Gnozal,
it works very well now. Image
And no side effects yet.
PB 6.02 x64, OS: Win 7 Pro x64 & Win 11 x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age in 2024: 56y
"Happiness is a pet." | "Never run a changing system!"
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Re: PureCOLOR library : coloring gadgets (and much more)

Post by ABBKlaus »

Hi Gnozal,

do you have a clue whats going wrong here :

on windows XP SP3 there are redraw issue´s when text is typed into the editable combobox. Just type some text jump to the beginning and insert some text.
(on windows 7 i don´t have this issue)

Regards Klaus

Code: Select all

  If OpenWindow(0, 0, 0, 230,150, "Event-Handling Beispiel...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
   ComboBoxGadget(3, 10, 80, 200, 20, #PB_ComboBox_Editable)
   AddGadgetItem(3,-1,"TEST")
   AddGadgetItem(3,-1,"1233452")
   AddGadgetItem(3,-1,"qw354rq234512345")
   
   PureCOLOR_SetGadgetColor(3,#PureCOLOR_SystemColor,#Red)
   
   Repeat
     Event = WaitWindowEvent()
   Until Event = #PB_Event_CloseWindow
 EndIf
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: PureCOLOR library : coloring gadgets (and much more)

Post by gnozal »

ABBKlaus wrote:on windows XP SP3 there are redraw issue´s when text is typed into the editable combobox. Just type some text jump to the beginning and insert some text.
(on windows 7 i don´t have this issue)
I have no idea (theme issue ?)
I just tested your code.
No problem with NT4 and XP sp2 with or without themes.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Re: PureCOLOR library : coloring gadgets (and much more)

Post by ABBKlaus »

gnozal wrote:I have no idea (theme issue ?)
I just tested your code.
No problem with NT4 and XP sp2 with or without themes.
Thanks for testing gnozal,

it seems to be a driver issue here at work, all PC´s are with integrated graphics (Intel). So it´s most likely a driver issue.
On VirtualBox and WindowsXP SP3 there is no redrawing problem (with enabled theme "Windows-XP").
I will try a new (Intel-)driver on monday.

Regards Klaus
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Re: PureCOLOR library : coloring gadgets (and much more)

Post by ABBKlaus »

Hi Gnozal,

its not possible to reset a PureCOLOR_SetCellColorCallback()

If it is not the intented behaviour please add is as a feature request :P

Code: Select all

PureCOLOR_SetCellColorCallback(#Window,0) ; <- does not work
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: PureCOLOR library : coloring gadgets (and much more)

Post by gnozal »

ABBKlaus wrote:its not possible to reset a PureCOLOR_SetCellColorCallback()
No, it isn't (it never was).
ABBKlaus wrote:If it is not the intented behaviour please add is as a feature request
Currently, the callback address is global (valid for all windows). So you can't remove it for one window.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Re: PureCOLOR library : coloring gadgets (and much more)

Post by ABBKlaus »

Thanks for the info Gnozal.

I only have one Window :wink:
My problem is the huge slowdown when the callback is active
and the listicon gets filled.

Regards klaus
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: PureCOLOR library : coloring gadgets (and much more)

Post by gnozal »

Update v14.09 (PB4.40 version)

Changes :
- new PureCOLOR_ResetCellColorCallback(*ProcedureAddress) function
  It resets the cell colorization callback address set with PureCOLOR_SetCellColorCallback().
  If *ProcedureAddress is #Null, the callback is inactivated.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Re: PureCOLOR library : coloring gadgets (and much more)

Post by ABBKlaus »

Many thanks for the fast release of the new version gnozal :D

Regards Klaus
Post Reply