[Lazarus] How to fix slow screen refresh of TListbox?
Bo Berglund
bo.berglund at gmail.com
Fri Nov 11 17:56:10 CET 2022
On Fri, 11 Nov 2022 17:10:08 +0100, Luca Olivetti via lazarus
<lazarus at lists.lazarus-ide.org> wrote:
>El 11/11/22 a les 16:29, Bo Berglund via lazarus ha escrit:
>> I have noticed that after a while the display becomes very sluggish when data
>> arrives and I think that is due to the way the component operates.
>
>You could try using a TSynEdit instead of a TListBox: some years ago I
>switched from TMemo to TSynEdit to do some logging in a similar (though
>I add lines instead of assigning the complete text, also, I delete the
>oldest line when there are 5000 lines) because I found that, under
>windows, TSynEdit is an order of magnitude (or more) faster than TMemo.
>No difference under linux though, and maybe it's no longer true nowadays.
>
I have never used TSynEdit before so I tried dropping one onto my form and it
looked a bit "strange" with a wide margin to the left...
How does it work (especially the margin that steals space)?
Note that I do not need an editor as such, just somewhere to show the log lines,
and possibly also a way to copy certain lines or text sections to paste
somewhere else.
BTW this application is on Windows and I am using Lazarus 2.0.12 and FPC 3.2.0
--
Bo Berglund
Developer in Sweden
More information about the lazarus
mailing list