On Tue, 6 Feb 2007 08:47:07 +0200
"Graeme Geldenhuys" <[EMAIL PROTECTED]> wrote:
> Hi Mattias,
>
> 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
^^^^
> It still doesn't make sense to me why you can't change the font color
> in OnCustomDraw, but yet you can in OnAdvancedCustomDraw? Could you
> possibly explain (if you have the time).
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.
I think, that the OnCustomDrawItem is not very useful at the
moment, because it has to paint the whole line, with tree lines, icons
and text. Maybe Borland thought the same and that's why they added the
Advanced event. I didn't check how compatible OnCustomDrawItem is.
Mattias
>
> Regards,
> - Graeme -
>
>
> On 2/5/07, Mattias Gaertner <[EMAIL PROTECTED]> wrote:
> > On Mon, 5 Feb 2007 14:50:54 +0200
> > "Graeme Geldenhuys" <[EMAIL PROTECTED]> wrote:
> >
> > > Hi,
> > >
> > > Since the IDE Messages Window component changed to a Treeview, the
> > > OnCustomDrawItem code doesn't work any more. More specifically,
> > > the Red, Green and Blue text for user defined hints ($Warning,
> > > $Note, etc) doesn't work any more - it always paints in black.
> > > See attached image.
> > >
> > > I tried to fix this myself, but can't see what the problem is. I
> > > placed debugln() entries in the msview.pp unit and the
> > > OnCustomDrawItem function does execute. It also does enter the if
> > > block checking that State doesn't contain Selected.
> > >
> > > The only thing I can think of, is that the
> > > Treeview.Canvas.Font.Color is ignored somewhere in the painting
> > > process. I'm using Lazarus 0.9.21 (latest svn revision) under
> > > Linux with GTK1 widgetset.
> >
> > Fixed.
> >
> > Mattias
> >
> >
> > _________________________________________________________________
> > To unsubscribe: mail [EMAIL PROTECTED] with
> > "unsubscribe" as the Subject
> > archives at http://www.lazarus.freepascal.org/mailarchives
> >
>
>
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives