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 itself is a custom widget). We call the
Canvas.DrawFocusRect() from within the MouseMove event. It seems to work
fine under LCL-GTK2, but could this be problematic on other platforms,
as painting outside the Paint event can normally have undefined results.
Or has LCL somehow resolved the issues of painting outside the Paint event?
No, carbon, cocoa and qt widgetset (qt on all platforms) cannot paint
outside of paint event.
FocusRect(s) can be saved in an object or array of focus TRectangles,
Update() or Update(RectToBeUpdated) can be called from MouseMove, and
then in paint method paint saved FocusRect(s).
zeljko
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus