Page 15 of 35

Posted: Tue Jun 27, 2006 6:39 pm
by nicolaus
@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

Posted: Wed Jun 28, 2006 9:10 am
by Pantcho!!
gnozal wrote:
Pantcho!! wrote:what is an owner draw? :?
I mean drawing all the stuff by yourself ... instead of only telling windows what color it should use.
Thats why i asked you :wink:

Posted: Thu Jun 29, 2006 10:49 am
by gnozal
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
Ok, for the next version.

Posted: Thu Jun 29, 2006 12:15 pm
by gnozal
Update V12.20 (both libs : PB3.94 and PB4.0x)

Changes :
- added Font.l argument to PureCOLOR_SetColumnHeaderColor()

Posted: Thu Jun 29, 2006 5:32 pm
by nicolaus
gnozal wrote:Update V12.20 (both libs : PB3.94 and PB4.0x)

Changes :
- added Font.l argument to PureCOLOR_SetColumnHeaderColor()
very thx for the fast insert of the parameter font.l
i love your lib and you do a very nice job!!!

Posted: Thu Jun 29, 2006 6:05 pm
by nicolaus
@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

Posted: Fri Jun 30, 2006 11:44 am
by gnozal
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.
Seems to work here (no problems when changing tabs) :

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
Or maybe I misunderstood ?

Posted: Fri Jun 30, 2006 1:13 pm
by Fangbeast
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.

Posted: Fri Jun 30, 2006 7:07 pm
by nicolaus
@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

Posted: Sat Jul 01, 2006 12:49 pm
by gnozal
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
Sorry, I could not play the AVI (missing codecs ?).
Does the above posted code work for you (listicon inside a panel) ?
A peace of code would sure help.

Posted: Sat Jul 01, 2006 1:21 pm
by nicolaus
@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

Posted: Sat Jul 01, 2006 2:01 pm
by gnozal
@nicolaus
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
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.

Posted: Sat Jul 01, 2006 2:03 pm
by gnozal
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).

Posted: Sun Jul 02, 2006 7:46 pm
by Inf0Byt3
Hi Gnozal, any chances to add this feature to your lib?

http://www.purebasic.fr/english/viewtopic.php?t=22557

Thanks.

Posted: Mon Jul 03, 2006 9:55 am
by gnozal
Inf0Byt3 wrote:Hi Gnozal, any chances to add this feature to your lib?

http://www.purebasic.fr/english/viewtopic.php?t=22557

Thanks.
Did you download the latest version of PureCOLOR and tried #PureCOLOR_DontSetBackColor as BackColor for your TextGagdet ?
If it don't work, please post a code example.
Note that some features don't work with XP themes.