Mike Orriss (TeamB) wrote in message
news:
VA.00000e12.00b01e3c@mikedesk…
> In article <7ldg3p$
s2p2@forums.borland.com
>, Daniel Gothe wrote:
> > When I then add items to the ListView, they erase the Bitmap. I tried
> > putting the Brush.Style of the TListView as bsClear, but it doesn’t seem
to
> > work.
> >
>
> Are you providing OnCustomDrawItem/OnCustomDrawItem events?
OK, me and Jody Dawkins just got this all sorted out and working. To create
a listview with a custom bitmap in the background do the following:
1) Add an event handler for OnCustomDraw that paints your bitmap to the
background
2) Add the following lines to the end of the OnCustomDraw routine:
[code lang=”delphi”] SetBkMode(Canvas.Handle,TRANSPARENT);
Perform(LVM_SETTEXTBKCOLOR,0,LongInt(CLR_NONE));
ListView_SetBKColor(Handle,CLR_NONE);
[/code]
Your text and images should now paint correctly over the bitmap.
Gerald
[tags]Delphi, Components, ListView[/tags]
0 Kommentare zu “ListView Background Bitmap”