Posted: Mon Feb 04, 2008 1:05 pm
yes, you are right (as usual)
I guess I am too dependant on your update prog
I guess I am too dependant on your update prog

http://www.purebasic.com
https://www.purebasic.fr/english/
It should download the PureCOLOR 4.10 library if you checked 'For PB 4.1x' ?kinglestat wrote:yes, you are right (as usual)
I guess I am too dependant on your update prog
Did you try using the cell coloring callback ?Xombie wrote:I noticed two things. One, if the listicon is currently showing colored lines and the user types something in the filterbar, the colors will disappear.
Second, in the same situation as above, sorting does not keep the row colors with the row. The rows sort but the colored lines don't move.
Code: Select all
PureCOLOR_SetCellColorCallback(WindowNumber.l, *ProcedureAddress)
Code: Select all
Procedure MyCellColorCallback(GadgetNumber.l, CellRow.l, CellColumn.l, *TextColor.LONG, *BackColor.LONG, *FontID.LONG)
;
; Do Stuff
;
EndProcedure
Did you 'register' the listicon before setting the callback ? If not, PureCOLOR doesn't subclass the gadget nor it's parents.Xombie wrote:I tried that and it worked great. .... until I had to move the listicon into a containergadget->panelgadget. Now it seems like the callback isn't being called anymore. Are you aware of any issues for when the listicon is not using the actual window as it's immediate parent?
Code: Select all
Enumeration
#Window_0
EndEnumeration
Enumeration
#Panel_0
#ListIcon_1
EndEnumeration
Define.l Event, EventWindow, EventGadget, EventType, EventMenu
Procedure MyCellColorCallback(GadgetNumber.l, CellRow.l, CellColumn.l, *TextColor.Long, *BackColor.Long, *FontID.Long)
Debug "MyCellColorCallback() !"
*BackColor\l = #Blue
*TextColor\l = #White
EndProcedure
Procedure OpenWindow_Window_0()
If OpenWindow(#Window_0, 450, 200, 400, 400, "Window_0", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar)
If CreateGadgetList(WindowID(#Window_0))
PanelGadget(#Panel_0, 25, 35, 365, 300)
AddGadgetItem(#Panel_0, -1, "Tab #1")
ListIconGadget(#ListIcon_1, 5, 15, 345, 250, "Gadget_1", 100, #PB_ListIcon_AlwaysShowSelection|#PB_ListIcon_GridLines|#PB_ListIcon_FullRowSelect)
AddGadgetColumn(#ListIcon_1, 1, "Column #2", 100)
AddGadgetColumn(#ListIcon_1, 2, "Column #3", 100)
SendMessage_(GadgetID(#ListIcon_1), #LVM_SETCOLUMNWIDTH, 0, #LVSCW_AUTOSIZE_USEHEADER)
SendMessage_(GadgetID(#ListIcon_1), #LVM_SETCOLUMNWIDTH, 1, #LVSCW_AUTOSIZE_USEHEADER)
SendMessage_(GadgetID(#ListIcon_1), #LVM_SETCOLUMNWIDTH, 2, #LVSCW_AUTOSIZE_USEHEADER)
AddGadgetItem(#ListIcon_1, -1, "A" + Chr(10) + "B" + Chr(10) + "C")
AddGadgetItem(#ListIcon_1, -1, "A" + Chr(10) + "B" + Chr(10) + "C")
AddGadgetItem(#ListIcon_1, -1, "A" + Chr(10) + "B" + Chr(10) + "C")
AddGadgetItem(#ListIcon_1, -1, "A" + Chr(10) + "B" + Chr(10) + "C")
CloseGadgetList()
EndIf
EndIf
EndProcedure
OpenWindow_Window_0()
PureCOLOR_SetGadgetColor(#ListIcon_1, #PureCOLOR_SystemColor, #PureCOLOR_SystemColor) ; just to register the gadget !!!
PureCOLOR_SetCellColorCallback(#Window_0, @MyCellColorCallback())
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_CloseWindow
EventWindow = EventWindow()
If EventWindow = #Window_0
CloseWindow(#Window_0)
Break
EndIf
EndSelect
ForEver
I simply fixed a bug ... DrawText_() almost does it all.Rook Zimbabwe wrote:Gnozal... this is soooo much better! I am truly imnpressed.
I am doing 2 things :Rook Zimbabwe wrote:I do see some sort of issue in the text placement. It is not always set off at the same angle or placement.
When the buttons are colored the text moves around and not in the same way. Some text is truncated with a "..." hyperbole mark. Some text is exactly the same, and some text has an invisible line at the top.
Is there something I can do to justify the text better?
It's a custom made library installer : http://www.purebasic.fr/english/viewtopic.php?t=18514Rook Zimbabwe wrote:#1. What installer are you using for this program, looks interesting?
There isn't. No paypal account.Rook Zimbabwe wrote:#2. Where is the donate link on that web page of yours!