PureCOLOR library : coloring gadgets (and much more)
Moderator: gnozal
@gnozal
is it possible to add one more function to your lib, so that we can change the font of a headercolumn to bold or to a new font?
thx and regards,
Nico
is it possible to add one more function to your lib, so that we can change the font of a headercolumn to bold or to a new font?
thx and regards,
Nico
Last edited by nicolaus on Wed Jun 28, 2006 3:23 pm, edited 1 time in total.
my live space
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Ok, for the next version.nicolaus wrote:@gnozal
is it possible to add one more function to your lib, so that we can change the font of a headercolumn to bold or to a new font?
thx and regards,
Nico
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:
Update V12.20 (both libs : PB3.94 and PB4.0x)
Changes :
- added Font.l argument to PureCOLOR_SetColumnHeaderColor()
Changes :
- added Font.l argument to PureCOLOR_SetColumnHeaderColor()
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
very thx for the fast insert of the parameter font.lgnozal wrote:Update V12.20 (both libs : PB3.94 and PB4.0x)
Changes :
- added Font.l argument to PureCOLOR_SetColumnHeaderColor()
i love your lib and you do a very nice job!!!
my live space
@gnozal
you have a bug in the function PureCOLOR_SetColumnHeaderColor().
I have a ListIconGadget in a PanelGadget and if i change the panelitem and go back to the item with the listicongadget it loos all colors and headercolors.
This prob is only if i use the PureCOLOR_SetColumnHeaderColor() function in this listicon.
Without the function PureCOLOR_SetColumnHeaderColor and and only the functions PureCOLOR_SetGadgetColorEx() it works nice.
regards,
Nico
you have a bug in the function PureCOLOR_SetColumnHeaderColor().
I have a ListIconGadget in a PanelGadget and if i change the panelitem and go back to the item with the listicongadget it loos all colors and headercolors.
This prob is only if i use the PureCOLOR_SetColumnHeaderColor() function in this listicon.
Without the function PureCOLOR_SetColumnHeaderColor and and only the functions PureCOLOR_SetGadgetColorEx() it works nice.
regards,
Nico
my live space
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Seems to work here (no problems when changing tabs) :nicolaus wrote:@gnozal
I have a ListIconGadget in a PanelGadget and if i change the panelitem and go back to the item with the listicongadget it loos all colors and headercolors.
Code: Select all
OpenWindow(0, 100, 300, 400, 250, "PureCOLOR test", #PB_Window_SystemMenu | #PB_Window_SizeGadget)
If CreateGadgetList(WindowID(0))
PanelGadget(10, 0, 0, 400, 250)
AddGadgetItem(10, -1, "Test 1")
; Tab 1
StringGadget(1, 10, 10, 90, 20, "StringGadget 1")
ListIconGadget(2, 10, 40, 150, 100, "1", 100, #PB_ListIcon_GridLines | #PB_ListIcon_FullRowSelect | #PB_ListIcon_AlwaysShowSelection)
AddGadgetColumn(2, 1, "2", 50)
AddGadgetColumn(2, 2, "3", 50)
AddGadgetItem(2, -1, "ListIconGadget 2-1" + Chr(10) + "A" + Chr(10) + "F")
AddGadgetItem(2, -1, "ListIconGadget 2-2" + Chr(10) + "B" + Chr(10) + "G")
AddGadgetItem(2, -1, "ListIconGadget 2-3" + Chr(10) + "C" + Chr(10) + "H")
AddGadgetItem(2, -1, "ListIconGadget 2-4" + Chr(10) + "D" + Chr(10) + "I")
AddGadgetItem(2, -1, "ListIconGadget 2-5" + Chr(10) + "E" + Chr(10) + "J")
TextGadget(3, 10, 160, 300, 30, "TextGadget 3", #PB_Text_Center)
ButtonGadget(4, 200, 10, 80, 20, "Button 4")
;PureRESIZE_SetGadgetResize(4, #True, #True, #True, #True)
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")
; Tab 2
AddGadgetItem(10, -1, "Test 2")
CloseGadgetList()
EndIf
; Adding colors
PureCOLOR_SetGadgetColor(1, RGB(255,0,0), -1)
PureCOLOR_SetGadgetColorEx(2, RGB(0,0,0), RGB(255, 255, 255), RGB(255, 255, 223), #PureCOLOR_LV_AlternateColors2)
PureCOLOR_SetGadgetColor(3, RGB(255,0,0), RGB(0,0,0))
PureCOLOR_SetButtonColor(4, RGB(255,0,0), RGB(0,255,0), #Green, #Yellow)
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_SetColumnHeaderColor(2, 0, RGB(255,0,0), RGB(100,100,0), LoadFont(0, "Courrier New", 8, #PB_Font_Bold))
;
Repeat
EventID = WaitWindowEvent()
Until EventID = #PB_Event_CloseWindow
;
End
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
- Fangbeast
- PureBasic Protozoa
- Posts: 4789
- Joined: Fri Apr 25, 2003 3:08 pm
- Location: Not Sydney!!! (Bad water, no goats)
nicolaus, are you using the up-to-date, current version of pb4? There were some refresh problems with panels in earlier versions of pb4 and we had to write manual refreshes (Force windows to do a repaint) to make them work.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
@gnozal
i have the same prob if i have the listicon in a conatinergadget().
If i have hide the container and reshow it the color settings are loost.
Here you can see a small avi video with the prob
PureCOLOR prob
regrads,
Nico
i have the same prob if i have the listicon in a conatinergadget().
If i have hide the container and reshow it the color settings are loost.
Here you can see a small avi video with the prob
PureCOLOR prob
regrads,
Nico
my live space
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Sorry, I could not play the AVI (missing codecs ?).nicolaus wrote:@gnozal
i have the same prob if i have the listicon in a conatinergadget().
If i have hide the container and reshow it the color settings are loost.
Here you can see a small avi video with the prob
PureCOLOR prob
regrads,
Nico
Does the above posted code work for you (listicon inside a panel) ?
A peace of code would sure help.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
@gnozal
I have the ListIcon in a ContainerGadget() not in a PanelGadget sorry.
Ok now i hafe the video as a flashmovie in a html-page so that you can see wat i mean.
here is the link:
PureColor prob
[EDIT]All the colors aof the listicons are set with you lib PureCOLOR[/EDIT]
regards,
Nico
I have the ListIcon in a ContainerGadget() not in a PanelGadget sorry.
Ok now i hafe the video as a flashmovie in a html-page so that you can see wat i mean.
here is the link:
PureColor prob
[EDIT]All the colors aof the listicons are set with you lib PureCOLOR[/EDIT]
regards,
Nico
my live space
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
@nicolaus
I still can't reproduce the problem.
Have a look at this code :The listicon is in a container. Press the button to hide/show the container. The colors are not lost (at least on my Windows 98SE system) when showing the listicon after it was hidden it.
I still can't reproduce the problem.
Have a look at this code :
Code: Select all
OpenWindow(0, 100, 300, 400, 250, "PureCOLOR test", #PB_Window_SystemMenu | #PB_Window_SizeGadget)
If CreateGadgetList(WindowID(0))
StringGadget(1, 10, 10, 90, 20, "StringGadget 1")
ContainerGadget(11, 10, 40, 150, 100, #PB_Container_Raised)
ListIconGadget(2, 0, 0, 150, 100, "1", 100, #PB_ListIcon_GridLines | #PB_ListIcon_FullRowSelect | #PB_ListIcon_AlwaysShowSelection)
AddGadgetColumn(2, 1, "2", 50)
AddGadgetColumn(2, 2, "3", 50)
AddGadgetItem(2, -1, "ListIconGadget 2-1" + Chr(10) + "A" + Chr(10) + "F")
AddGadgetItem(2, -1, "ListIconGadget 2-2" + Chr(10) + "B" + Chr(10) + "G")
AddGadgetItem(2, -1, "ListIconGadget 2-3" + Chr(10) + "C" + Chr(10) + "H")
AddGadgetItem(2, -1, "ListIconGadget 2-4" + Chr(10) + "D" + Chr(10) + "I")
AddGadgetItem(2, -1, "ListIconGadget 2-5" + Chr(10) + "E" + Chr(10) + "J")
CloseGadgetList()
TextGadget(3, 10, 160, 300, 30, "TextGadget 3", #PB_Text_Center)
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")
CloseGadgetList()
EndIf
; Adding colors
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_AlternateColors2)
PureCOLOR_SetGadgetColor(3, RGB(255,0,0), RGB(0,0,0))
PureCOLOR_SetButtonColor(4, RGB(255,0,0), RGB(0,255,0), #Green, #Yellow)
PureCOLOR_SetGadgetColor(5, RGB(255,0,0), RGB(255,255,0))
PureCOLOR_SetGadgetColor(6, RGB(255,255,0), #PureCOLOR_DontSetBackColor)
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_SetColumnHeaderColor(2, 0, RGB(255,0,0), RGB(100,100,0))
PureCOLOR_SetCellColor(2, 1, 1, #Red, #Black)
;
Repeat
EventID = WaitWindowEvent()
If EventID = #PB_Event_Gadget
If EventGadget() = 4
toggle ! 1
HideGadget(11, toggle)
EndIf
EndIf
Until EventID = #PB_Event_CloseWindow
;
End
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:
Update (PB4.00 lib only)
- PB4.00 code was out of synch : it's now the same as the PB3.94 lib (except for the PB4.00 specificities).
- PB4.00 code was out of synch : it's now the same as the PB3.94 lib (except for the PB4.00 specificities).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Hi Gnozal, any chances to add this feature to your lib?
http://www.purebasic.fr/english/viewtopic.php?t=22557
Thanks.
http://www.purebasic.fr/english/viewtopic.php?t=22557
Thanks.
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Did you download the latest version of PureCOLOR and tried #PureCOLOR_DontSetBackColor as BackColor for your TextGagdet ?Inf0Byt3 wrote:Hi Gnozal, any chances to add this feature to your lib?
http://www.purebasic.fr/english/viewtopic.php?t=22557
Thanks.
If it don't work, please post a code example.
Note that some features don't work with XP themes.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).