Support Forums > Other Software and Code

FF3 - ListView Text And Text Background Colouring

(1/1)

SeaVipe:
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.)


Thanks.

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.

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

David Kenny:
SeaVipe,

This might speed up your research.  Example code by Jean-pierre Leroy: https://www.planetsquires.com/protect/forum/index.php?topic=2026.msg16333#msg16333
Link in the top post.


David

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


Clive

Navigation

[0] Message Index

Go to full version