Re: [Lazarus] Calling DrawFocusRect() outside the Paint() event

2016-10-10 Thread Alexey via Lazarus
My opinion about sbj. You may do check, or not do check, but pls, remove that Debug line which prints error. I want it for Cudatext, which prints lot of crap with it. I cant yet rework ATSynEdit code (to "fix it") Alexey -- ___ Lazarus mailing list La

Re: [Lazarus] Calling DrawFocusRect() outside the Paint() event

2016-10-10 Thread Mattias Gaertner via Lazarus
On Mon, 10 Oct 2016 14:05:56 +0200 (CEST) Michael Van Canneyt wrote: >[...] > But the effect is that inside the Paint() event you are actually drawing to a > bitmap (buffer), > which is then swapped to the display once the paint method is done ? The effect is that you can do small draws inside

Re: [Lazarus] Calling DrawFocusRect() outside the Paint() event

2016-10-10 Thread Michael Van Canneyt via Lazarus
On Mon, 10 Oct 2016, Mattias Gaertner via Lazarus wrote: On Mon, 10 Oct 2016 12:50:26 +0200 (CEST) Michael Van Canneyt wrote: On Mon, 10 Oct 2016, Mattias Gaertner via Lazarus wrote: > On Mon, 10 Oct 2016 12:05:41 +0200 (CEST) > Michael Van Canneyt via Lazarus wrote: > >> [...] >> > If

Re: [Lazarus] Calling DrawFocusRect() outside the Paint() event

2016-10-10 Thread Mattias Gaertner via Lazarus
On Mon, 10 Oct 2016 11:56:32 +0100 Graeme Geldenhuys via Lazarus wrote: > On 2016-10-10 11:50, Michael Van Canneyt via Lazarus wrote: > > I thought lazarus did double buffering by default, so this should be so > > automatically ? > > I don't believe LCL uses double buffering by default (for s

Re: [Lazarus] Calling DrawFocusRect() outside the Paint() event

2016-10-10 Thread Mattias Gaertner via Lazarus
On Mon, 10 Oct 2016 12:50:26 +0200 (CEST) Michael Van Canneyt wrote: > On Mon, 10 Oct 2016, Mattias Gaertner via Lazarus wrote: > > > On Mon, 10 Oct 2016 12:05:41 +0200 (CEST) > > Michael Van Canneyt via Lazarus wrote: > > > >> [...] > >> > If you want to optimize for mini changes like the

Re: [Lazarus] Calling DrawFocusRect() outside the Paint() event

2016-10-10 Thread zeljko via Lazarus
On 10/10/2016 11:21 AM, Graeme Geldenhuys via Lazarus wrote: Hi, Working on a visual report designer for the upcoming fpReport. We use Canvas.DrawFocusRect() to draw a selection rectangle around a reporting element (eg: a memo). We can drag that rectangle around in the report designer (which its

Re: [Lazarus] Calling DrawFocusRect() outside the Paint() event

2016-10-10 Thread Graeme Geldenhuys via Lazarus
On 2016-10-10 11:11, Mattias Gaertner via Lazarus wrote: > Draw to a bitmap and in OnPaint draw that. Similar to a TImage. > Then you can also use aggpas. Incidently, that is how fpGUI's latest 'develop' branch overcomes the painting outside the Paint method problems. Seeing as AggPas is used as t

Re: [Lazarus] Calling DrawFocusRect() outside the Paint() event

2016-10-10 Thread Graeme Geldenhuys via Lazarus
On 2016-10-10 11:50, Michael Van Canneyt via Lazarus wrote: > I thought lazarus did double buffering by default, so this should be so > automatically ? I don't believe LCL uses double buffering by default (for some reason or another). At least that is what I was told in the Lazarus Forums. Regar

Re: [Lazarus] Calling DrawFocusRect() outside the Paint() event

2016-10-10 Thread Michael Van Canneyt via Lazarus
On Mon, 10 Oct 2016, Mattias Gaertner via Lazarus wrote: On Mon, 10 Oct 2016 12:05:41 +0200 (CEST) Michael Van Canneyt via Lazarus wrote: [...] > If you want to optimize for mini changes like the focusrect you might > want to use a bitmap. Please explain ? Draw to a bitmap and in OnPai

Re: [Lazarus] Calling DrawFocusRect() outside the Paint() event

2016-10-10 Thread Mattias Gaertner via Lazarus
On Mon, 10 Oct 2016 12:05:41 +0200 (CEST) Michael Van Canneyt via Lazarus wrote: >[...] > > If you want to optimize for mini changes like the focusrect you might > > want to use a bitmap. > > Please explain ? Draw to a bitmap and in OnPaint draw that. Similar to a TImage. Then you can also us

Re: [Lazarus] Calling DrawFocusRect() outside the Paint() event

2016-10-10 Thread Graeme Geldenhuys via Lazarus
On 2016-10-10 10:49, Mattias Gaertner via Lazarus wrote: > Some widgetsets like Carbon can only paint during the Paint event. Thanks for confirming my suspicions and useful advice. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net

Re: [Lazarus] Calling DrawFocusRect() outside the Paint() event

2016-10-10 Thread Michael Van Canneyt via Lazarus
On Mon, 10 Oct 2016, Mattias Gaertner via Lazarus wrote: On Mon, 10 Oct 2016 10:21:48 +0100 Graeme Geldenhuys via Lazarus wrote: Hi, Working on a visual report designer for the upcoming fpReport. We use Canvas.DrawFocusRect() to draw a selection rectangle around a reporting element (eg: a

Re: [Lazarus] Calling DrawFocusRect() outside the Paint() event

2016-10-10 Thread Mattias Gaertner via Lazarus
On Mon, 10 Oct 2016 10:21:48 +0100 Graeme Geldenhuys via Lazarus wrote: > Hi, > > Working on a visual report designer for the upcoming fpReport. We use > Canvas.DrawFocusRect() to draw a selection rectangle around a reporting > element (eg: a memo). We can drag that rectangle around in the repor

[Lazarus] Calling DrawFocusRect() outside the Paint() event

2016-10-10 Thread Graeme Geldenhuys via Lazarus
Hi, Working on a visual report designer for the upcoming fpReport. We use Canvas.DrawFocusRect() to draw a selection rectangle around a reporting element (eg: a memo). We can drag that rectangle around in the report designer (which itself is a custom widget). We call the Canvas.DrawFocusRect() fro