On Tue, 29 May 2007 15:11:48 +0200
Mattias Gärtner <[EMAIL PROTECTED]> wrote:
> Zitat von "A.J. Venter" <[EMAIL PROTECTED]>:
>
> > > DoubleBuffered is a hint for the interface.
> > > The gtk2 intf always paints double buffered for each gdkwindow.
> > > That means paint events are double buffered, other painting not.
> > > The gtk1 intf has almost no doublebuffering. I'm not sure about
> > > the other interfaces.
> > Aaah okay, that makes sense.
> > >
> > > I only did a small test: The gtk intf only paints once per
> > > Invalidate and there I see no flicker at all. That's because the
> > > bitbtn glyph handle is a memory handle and not an image on the
> > > screen. Maybe the win32 intf is creating a screen handle? That
> > > would explain the flickering.
> > This is a GTK1 app.
> > The catch is that if I don't call invalidate, the buttons go
> > entirely blank instead of merely being grayed out, this includes
> > the captions. If I DO call invalidate, I end up with a whole LOT of
> > repaints all the time - which is... well ugly to say the least.
> >
> > I am still not sure how best to approach this. Shouldn't the buttons
> > remain in their last state, repainted when "damaged" until such time
> > as they are changed ? I'm not even moving anything here just
> > painting some info onto SOME of the buttons and updating those
> > periodically while setting the others disabled until such time as
> > they are in use.
> >
> > And it's the DISABLED buttons which are giving me grief, the enabled
> > once have a very slight flicker but it's actually almost nothing
> > (again I don't know why that would be).
>
> I can reproduce the issue: gtk1 with enabled=false TBitBtn.
> I wonder, why only the flickering is only visible with a disabled
> bitbtn ...
It seems, gtk_pixmap is creating the disabled image on-the-fly on first
paint. So, the flickering is built-in. Because you change the image
often, you see it often.
Conclusion:
gtk1+TBitBtn+disabled = flicker
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives