[Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

Bart bartjunk64 at gmail.com
Fri Nov 4 14:28:45 CET 2016


On 11/4/16, Ondrej Pokorny via Lazarus <lazarus at lists.lazarus-ide.org> wrote:

> The TextHint implementation should be completely rewritten. It shouldn't
> use the text property but paint the TextHint onto the control by itself.
> Windows can do that and Qt/Gtk2 should be able to do it as well (IIRC -
> I talked about it with zeljko in Lazarus ML). For that some new virtual
> paint method (PaintAfterInterface) should be introduced - that would
> call the widgetset dependent PaintAfterInterface method.

The Windows API provides a nice interface to set TextHint (and the
possibility to display it if control has focus, but Text is empty).
At the time I implemented it, I saw no API in GTK/QT for a
TextHint-like feature.

Unfortunately TCustomEdit does not have a Canvas ;-)
And I was unable to find a suitable way to paint over the control in a
reliable way.

Not messing around with RealSetText/RealGetText would of course be
much more disirable.

Bart


More information about the Lazarus mailing list