Board index » cppbuilder » TListView OnDrawItem is never called...

TListView OnDrawItem is never called...

even though I've set OwnerDraw.

What I really want to do is fiddle with the text font depending on what I
see in the text.  OnCustomDrawItem seems to do that alright, except that if
I set Default = true I lose the formatting I did and if I set it to False I
lose the checkbox on the left.

--
Michael D. Spence
Mockingbird Data Systems, Inc.

 

Re:TListView OnDrawItem is never called...


Simply put; when you set OwnerDraw, you must draw everything (checkbox
included).

HTH
Mark

Re:TListView OnDrawItem is never called...


"Mark L. Bartlett" <mbart...@sound.net> wrote in message
news:3A8E4A6C.7F9B4E0A@sound.net...

Quote
> Simply put; when you set OwnerDraw, you must draw everything (checkbox
> included).

Bah.  I was afraid of that.  But why doesn't OnDrawItem never execute?

Re:TListView OnDrawItem is never called...


You need to set the OwnerDraw property to true.

HTH
Mark

Re:TListView OnDrawItem is never called...


That was the point.  I DID set OwnerDraw to true.  I even tried setting it
programatically (although the de{*word*81} claimed it was already on) just in
case something odd was happening to it at startup time.  But OnDrawItem just
never got called.

I thought about writing a Delphi program so I could step into the .pas file
just to see, but as it turned out I discovered that I really didn't want a
TListView anyway because there's TCheckListBox.  I didn't know about it but
does everything I want.  Anyway, thanks!

"Mark L. Bartlett" <mbart...@sound.net> wrote in message
news:3A8E7FBD.8D6054E8@sound.net...

Quote
> You need to set the OwnerDraw property to true.

> HTH
> Mark

Other Threads