On 2/6/07, Mattias Gaertner <[EMAIL PROTECTED]> wrote:
> I looked at the changes you made to see what I did wrong. I see you
> use the TreeView's OnAdvancedCustomDraw instead of OnCustomDraw.
OnCustomDrawItem
^^^^
Ah yes, sorry. I meant the XXXXDrawItem events.
Do you want to know, how TCustomTreeView.DoPaintNode works, or why it
works this way?
The font color is overriden by DoPaintNode in both cases.
Umm, ok so the problem was actually (kind of) in the TTreeview control
and not in the msgview.pp unit.
I think, that the OnCustomDrawItem is not very useful at the
moment, because it has to paint the whole line, with tree lines, icons
Still doesn't make sense why it got overriden. Could it possible be
because of this strange code in TCustomTreeView.DoPaintNode (it
doesn't look right to me).
In TCustomTreeView.DoPaintNode() on line 4125 and on line 4201it fires
off the OnCustomDrawItem event! Why twice in the same method
(DoPaintNode)? Shouldn't this occur only once?
And in both cases, if CustomDrawItem event handle returns True, it
will exit the DoPaintNode, which should prevent painting being
overriden. Just a thought. ;-)
--
Graeme Geldenhuys
There's no place like S34° 03.168' E018° 49.342'
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives