Atozed Forums
TListView equivalent - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: TListView equivalent (/thread-4688.html)



TListView equivalent - denville - 11-15-2024

Hi there - I'm (still) using CPB XE7 with IW 15.0.22, no question of updating.

I need to present some data in a table for which in CPB I use a TListView.  I need to set the background colour of each line according to the context of the line's data.  I chose TListView because tweeking the colour is easy, I simply use OnCustomDrawSubItem, extract the context from the data, and apply the colour:

if ( adlt == 'A' )
lv->Canvas->Brush->Color = (TColor)nA_COLOUR;
else if ( adlt == 'D' )
lv->Canvas->Brush->Color = (TColor)nD_COLOUR;


Easy as that!

In the web version I can format the text presentation as required (eg using sprintf to prepare a complete line) but I can't see if there is a list component that will allow me to set the colour ?

Many thanks for any advice.

Denville.