You mean StringGadget backcolor = window background color ?Pantcho!! wrote:What about transparent Background Color?
an important factor to such a great special library!! (great for stringgadget's)
PureCOLOR library : coloring gadgets (and much more)
Moderator: gnozal
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Ok maybe i didnt explain myself so good, lets say i setup a windowbackground IMAGE doesnt matter which color i will use in textgadget it will do a box around the window image background.
in short:
i have a window background image
set the textgadget background color transparent so only the foreground color will show with my nice window background.
if this is possible this lib is perfect.
in short:
i have a window background image
set the textgadget background color transparent so only the foreground color will show with my nice window background.
if this is possible this lib is perfect.
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Transparent is not possible I think, but it is possible to set the textgadget background color accordingly to the image color (so it looks transparent).Pantcho!! wrote:set the textgadget background color transparent so only the foreground color will show with my nice window background.
if this is possible this lib is perfect.
Maybe for the next version.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Thank youoldBear wrote:This routine is fantastic![]()
Many thanks for the support. I hope this is indicative of user base support. If so, I'll be a happy camper.

And wellcome to Purebasic !
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- Enthusiast
- Posts: 781
- Joined: Fri Apr 25, 2003 6:51 pm
- Location: NC, USA
- Contact:
Question: When I change the color of the window, the background color
of text gadgets, frame labels, and string gadgets (at least) does not change.
You can see this by running a slightly modifed version of your example:
and looking at the TextGadget(3)
Is there a way using PureCOLOR to make the background default to
transparent instead of grey?
Thanks
Terry
of text gadgets, frame labels, and string gadgets (at least) does not change.
You can see this by running a slightly modifed version of your example:
Code: Select all
;
; PureCOLOR library test file 1
;
; --------------------------------------------------------
;
; Set CallBack
Procedure.l WindowCallBack(WindowID.l, Message.l, wParam.l, lParam.l)
ReturnValue.l = #PB_ProcessPureBasicEvents
;
ReturnValue = PureCOLOR_CallBack(WindowID, Message, wParam, lParam, ReturnValue) ; <-------- add this line in your window callback
;
ProcedureReturn ReturnValue
EndProcedure
; Create Window
OpenWindow(0, 100, 300, 400, 200, #PB_Window_SystemMenu, "PureCOLOR test")
SetWindowCallback(@WindowCallBack())
If CreateGadgetList(WindowID())
StringGadget(1, 10, 10, 90, 20, "StringGadget 1")
ListIconGadget(2, 10, 40, 150, 100, "", 146, #PB_ListIcon_GridLines | #PB_ListIcon_FullRowSelect)
AddGadgetItem(2, -1, "ListIconGadget 2-1")
AddGadgetItem(2, -1, "ListIconGadget 2-2")
AddGadgetItem(2, -1, "ListIconGadget 2-3")
AddGadgetItem(2, -1, "ListIconGadget 2-4")
AddGadgetItem(2, -1, "ListIconGadget 2-5")
TextGadget(3, 10, 160, 300, 30, "TextGadget 3", #PB_Text_Center)
DisableGadget(3,#TRUE)
ButtonGadget(4, 200, 10, 80, 20, "Button 4")
ComboBoxGadget(5, 295, 10, 100, 100)
AddGadgetItem(5, -1, "ComboBox 5-1")
AddGadgetItem(5, -1, "ComboBox 5-2")
SetGadgetState(5, 0)
CheckBoxGadget(6, 110, 10, 80, 20, "CheckBox 6")
ListViewGadget(7, 160, 40, 150, 100, #PB_ListIcon_GridLines)
AddGadgetItem(7, -1, "ListViewGadget 7-1")
AddGadgetItem(7, -1, "ListViewGadget 7-2")
AddGadgetItem(7, -1, "ListViewGadget 7-3")
EndIf
; Adding colors
PureCOLOR_SetWindowColor(0, RGB(249, 248, 158))
PureCOLOR_SetGadgetColor(1, RGB(255,0,0), -1)
;PureCOLOR_SetGadgetColor(2, RGB(0,255,0), -1)
PureCOLOR_SetGadgetColorEx(2, RGB(0,0,0), RGB(255, 255, 255), RGB(255, 255, 223), #PureCOLOR_LV_AlternateColors)
;PureCOLOR_SetGadgetColor(3, RGB(255,0,0), RGB(0,0,0))
PureCOLOR_SetButtonColor(4, RGB(255,0,0), RGB(0,255,0))
PureCOLOR_SetGadgetColor(5, RGB(255,0,0), RGB(255,255,0))
PureCOLOR_SetGadgetColor(6, RGB(255,255,0), -1)
PureCOLOR_SetGadgetColor(7, RGB(255,0,0), RGB(100,100,0))
PureCOLOR_SetGadgetColorEx(2, RGB(255,0,0), RGB(0,255,0), 0, #PureCOLOR_LTV_SelectedItem)
;PureCOLOR_ClearGadgetColor(2)
;
Repeat
Until WaitWindowEvent() = #PB_EventCloseWindow
;
End
Is there a way using PureCOLOR to make the background default to
transparent instead of grey?
Thanks
Terry
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
In the current version, no.TerryHough wrote:Is there a way using PureCOLOR to make the background default to transparent instead of grey? Thanks Terry
However, in the current beta, if you specify BackColor = #PureCOLOR_DontSetBackColor, the gadget back color is the current window color, so it simulates transparency.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Library update
Whats new :
- PureCOLOR_SetGadgetColor : if BackColor = #PureCOLOR_DontSetBackColor, BackColor is the parent window color (simulates transparency)
- PureCOLOR_SetGadgetColorEx : new flag #PureCOLOR_BackgroundImage : gadget's backcolor is image color (simulates transparency)
Special Terry version
Whats new :
- PureCOLOR_SetGadgetColor : if BackColor = #PureCOLOR_DontSetBackColor, BackColor is the parent window color (simulates transparency)
- PureCOLOR_SetGadgetColorEx : new flag #PureCOLOR_BackgroundImage : gadget's backcolor is image color (simulates transparency)
Special Terry version

For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- Enthusiast
- Posts: 781
- Joined: Fri Apr 25, 2003 6:51 pm
- Location: NC, USA
- Contact:
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Library update
What's new :
- new function : PureCOLOR_SetPopupMenuBackColor()
- new function : PureCOLOR_ClearAllColorsForGadget()
- new function : PureCOLOR_RedrawGadgetAfterColor()
- new feature : column headers now also use dynamic coordinates
- new feature : PureCOLOR_SetButtonColor() has extra colors (when button is pushed) and #PB_Button_Toggle support
What's new :
- new function : PureCOLOR_SetPopupMenuBackColor()
- new function : PureCOLOR_ClearAllColorsForGadget()
- new function : PureCOLOR_RedrawGadgetAfterColor()
- new feature : column headers now also use dynamic coordinates
- new feature : PureCOLOR_SetButtonColor() has extra colors (when button is pushed) and #PB_Button_Toggle support
Code: Select all
; Create Window
OpenWindow(0, 100, 300, 310, 40, #PB_Window_ScreenCentered | #PB_Window_SystemMenu, "PureCOLOR button test")
If CreateGadgetList(WindowID())
ButtonGadget(3, 10, 10, 80, 20, "Normal")
ButtonGadget(4, 210, 10, 80, 20, "Extra + Toggle", #PB_Button_Toggle)
ButtonGadget(6, 110, 10, 80, 20, "Extra Colors")
EndIf
; Adding colors
PureCOLOR_SetButtonColor(3, RGB(255,0,255), RGB(0,255,255))
PureCOLOR_SetButtonColor(4, RGB(255,0,0), RGB(0,255,0), RGB(255,127,0), RGB(255,255,0))
;PureCOLOR_SetButtonColor(6, RGB(255,0,0), RGB(0,255,0), RGB(255,127,0), RGB(255,255,0))
PureCOLOR_SetButtonColor(6, RGB(255,0,0), #PureCOLOR_SystemColor, RGB(255,0,0), #PureCOLOR_SystemColor)
;
Repeat
Until WaitWindowEvent() = #PB_EventCloseWindow
End
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Will you be adding colouring to menus?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
PureCOLOR_SetPopupMenuBackColor() may also work for menu (I didn't test it). If not, I will fix it.DoubleDutch wrote:Will you be adding colouring to menus?
If you mean full color support (menu textcolor, etc...), probably not ; but who knows ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
I mean menu text colour, if you want i can try to provide some code to do it if it helps?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
You mean owner draw menus ?DoubleDutch wrote:I mean menu text colour, if you want i can try to provide some code to do it if it helps?
They don't seem to work very well under Win9x or WinNT4, and I don't have Win2k/XP (yet ?). Of course, if you have some code that works with older OS, I could use it.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).