Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TListView equivalent
#1
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)