Support Forums > Other Software and Code

FF3 - ListView Text And Text Background Colouring


Does anyone know if a ListView control can have different coloured Text And Text Background based on Items?
The 3 below work properly but they set colours for the entire ListView control not individual Items like Rows or Cells:

--- Code: ---
    '' Text
    ListView_SetTextColor(HWND_FORM1_LISTVIEW1, CLR_NONE) ' Windows text colour.
    '' Grid
    ListView_SetTextBkColor(HWND_FORM1_LISTVIEW1, &HBCB772 )
    '' The BackGround, behind everything
    ListView_SetBkColor(HWND_FORM1_LISTVIEW1, &HD25FDC)

--- End code ---

I've been on the Microsoft site looking into all the various ListView API commands but nothing looks as though it will do what I want.
(If not then I'll dig a bit deeper into James Klutho's GRD (very nice) which I've yet to figure out how to get onto a FF3 or WinFBE form.)


Josť Roca:
No. Windows controls do what they do and, when you want something different, you have to make them owenerdraw and paint them by yourself.

Thanks Josť, I had a feeling that was going to be the answer. Time for a little research!

David Kenny:

This might speed up your research.  Example code by Jean-pierre Leroy:
Link in the top post.


Thank you, David, Jean-Pierre's code works great; just what I was looking for!



[0] Message Index

Go to full version