hI,
I am using the excelent Danilo's code for colored ListView, but when i add #LBS_EXTENDEDSEL for letting the user multiselect the listview dosent repaint properly, the same problem with a image as background of the listview.
Here is the code (Its Danilo's just with the #LBS_EXTENDEDSEL added)
Code: Select all
hWnd = OpenWindow(1,10,10,300,300,#PB_Window_SystemMenu,"TEST")
CreateGadgetList(hWnd)
listview = ListViewGadget(3,10,10,280,280,#LBS_EXTENDEDSEL)
For a = 1 To 10
AddGadgetItem(3,-1,"COOOOOOL")
Next a
ColorBrush = CreateSolidBrush_(RGB($00,$00 ,$00)) ; BACKGROUND
;ColorBrush = CreatePatternBrush_(LoadImage(1,"MY.BMP"))
;---
Procedure mycallback(hWnd, Message, wParam, lParam)
Shared ColorBrush
RetValue = #PB_ProcessPureBasicEvents
Select Message
Case #WM_CTLCOLORLISTBOX
SetTextColor_(wParam,RGB($FF,$FF,$00)) ; FOREGROUND
SetBkMode_(wParam, #TRANSPARENT)
RetValue = ColorBrush
EndSelect
ProcedureReturn RetValue
EndProcedure
SetWindowCallback(@mycallback())
;---
Repeat : Until WaitWindowEvent() = #PB_EventCloseWindow
;---
DeleteObject_(ColorBrush)
Best Regards
Ricardo
Dont cry for me Argentina...
