Re: [Lazarus] How to fix slow screen refresh of TListbox?

2022-11-22 Thread Salvatore Coppola via lazarus
Back to the first question. You can append your data with lb.items.text. Just prepare your data in a string like this: strtmp:=data1+lineending+data2+lineending+. And append lb.items.text:=lb.items.text+lineending+strtmp Yes it is a workaround but do the trick like beginupdate Ciao ⁣Ottieni

Re: [Lazarus] How to fix slow screen refresh of TListbox?

2022-11-20 Thread Jean SUZINEAU via lazarus
Maybe you could add a buffer in your flow of data, storing the incoming data ? When a line ending arrives, you can flush your buffer to Synedit up to the line ending, keeping in the buffer just the end of the data not yet terminated by a line ending. --

Re: [Lazarus] How to fix slow screen refresh of TListbox?

2022-11-20 Thread Vojtěch Čihák via lazarus
It wouldn't be that hard to write custom component based on TGraphicControl + TBitmap with built-in bitmap font. Copying bitmap letters will be faster than rendering from ttf.   V. __ Od: "Bo Berglund via lazarus" Komu:

Re: [Lazarus] How to fix slow screen refresh of TListbox?

2022-11-20 Thread Bo Berglund via lazarus
On Sun, 20 Nov 2022 18:21:56 -0300, Flávio Etrusco via lazarus wrote: >I see. My point is that you don't need to copy the whole DataBuffer and >re-populate the whole SynEdit each time you receive new data. But this >probably won't matter much unless you have hundreds of thousands of lines

Re: [Lazarus] How to fix slow screen refresh of TListbox?

2022-11-20 Thread Flávio Etrusco via lazarus
Em dom., 20 de nov. de 2022 04:23, Bo Berglund via lazarus < lazarus@lists.lazarus-ide.org> escreveu: > On Fri, 18 Nov 2022 18:40:57 -0300, Flávio Etrusco via lazarus > wrote: > > >Em dom., 13 de nov. de 2022 às 18:36, Luca Olivetti via lazarus < > >lazarus@lists.lazarus-ide.org> escreveu: > > >

Re: [Lazarus] How to fix slow screen refresh of TListbox?

2022-11-19 Thread Bo Berglund via lazarus
On Fri, 18 Nov 2022 18:40:57 -0300, Flávio Etrusco via lazarus wrote: >Em dom., 13 de nov. de 2022 às 18:36, Luca Olivetti via lazarus < >lazarus@lists.lazarus-ide.org> escreveu: > >> El 12/11/22 a les 12:13, Bo Berglund via lazarus ha escrit: >> > On Sat, 12 Nov 2022 09:45:15 +0100, Luca

Re: [Lazarus] How to fix slow screen refresh of TListbox?

2022-11-18 Thread Flávio Etrusco via lazarus
Em dom., 13 de nov. de 2022 às 18:36, Luca Olivetti via lazarus < lazarus@lists.lazarus-ide.org> escreveu: > El 12/11/22 a les 12:13, Bo Berglund via lazarus ha escrit: > > On Sat, 12 Nov 2022 09:45:15 +0100, Luca Olivetti via lazarus > > wrote: > > > >> El 11/11/22 a les 23:37, Bo Berglund via

Re: [Lazarus] How to fix slow screen refresh of TListbox?

2022-11-18 Thread Flávio Etrusco via lazarus
Em sex., 11 de nov. de 2022 às 12:29, Bo Berglund via lazarus < lazarus@lists.lazarus-ide.org> escreveu: > > I am using a TListbox component on a form for displaying debug data arriving > over a serial line at 115200 baud. > The data are a set of MQTT telegram texts which arrive in packets of

Re: [Lazarus] How to fix slow screen refresh of TListbox?

2022-11-13 Thread Luca Olivetti via lazarus
El 12/11/22 a les 12:13, Bo Berglund via lazarus ha escrit: On Sat, 12 Nov 2022 09:45:15 +0100, Luca Olivetti via lazarus wrote: El 11/11/22 a les 23:37, Bo Berglund via lazarus ha escrit: But how to jump to the end of the text on screen?

Re: [Lazarus] How to fix slow screen refresh of TListbox?

2022-11-12 Thread Bo Berglund via lazarus
On Sat, 12 Nov 2022 09:45:15 +0100, Luca Olivetti via lazarus wrote: >El 11/11/22 a les 23:37, Bo Berglund via lazarus ha escrit: > >> But how to jump to the end of the text on screen? >> > >TheSynEdit.TopLine:=TheSynEdit.Lines.Count-TheSynEdit.LinesInWindow+1 > Did not work, but this does

Re: [Lazarus] How to fix slow screen refresh of TListbox?

2022-11-12 Thread Luca Olivetti via lazarus
El 11/11/22 a les 23:37, Bo Berglund via lazarus ha escrit: But how to jump to the end of the text on screen? TheSynEdit.TopLine:=TheSynEdit.Lines.Count-TheSynEdit.LinesInWindow+1 Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34

Re: [Lazarus] How to fix slow screen refresh of TListbox?

2022-11-12 Thread Bo Berglund via lazarus
On Fri, 11 Nov 2022 23:37:14 +0100, Bo Berglund via lazarus wrote: Concerning TSynEdit: >I have a couple of questions: > >1) Is there a way to make sure that when adding text to synedit the view >shifts such that the last line is visible? >I.e. Automatically scroll the text up when new text is

Re: [Lazarus] How to fix slow screen refresh of TListbox?

2022-11-11 Thread Bo Berglund via lazarus
On Fri, 11 Nov 2022 18:49:15 +0100, Luca Olivetti via lazarus wrote: >Play with the properties in the project inspector, you can remove the >gutter (gutter.visible -> false), the margin (by setting RightEdge to a >very big value, say 800) and customize much of its appearance.. > I replaced the

Re: [Lazarus] How to fix slow screen refresh of TListbox?

2022-11-11 Thread Luca Olivetti via lazarus
El 11/11/22 a les 17:56, Bo Berglund via lazarus ha escrit: 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)? Play with the properties in the

Re: [Lazarus] How to fix slow screen refresh of TListbox?

2022-11-11 Thread Werner Pamler via lazarus
Am 11.11.2022 um 16:29 schrieb Bo Berglund via lazarus: You see that the buffer contains the complete log history from the start... When the first block of data has arrived I would store the length of the buffer at this time. Then next time when new data come in, I would extract the "new

Re: [Lazarus] How to fix slow screen refresh of TListbox?

2022-11-11 Thread Bo Berglund via lazarus
On Fri, 11 Nov 2022 17:10:08 +0100, Luca Olivetti via lazarus 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

Re: [Lazarus] How to fix slow screen refresh of TListbox?

2022-11-11 Thread Bo Berglund via lazarus
On Fri, 11 Nov 2022 16:29:31 +0100, Bo Berglund via lazarus wrote: >Now I wonder if there is some way to do as I did when I worked in Delphi with >TListView objects, where I could use the BeginUpdate and EndUpdate calls to >make >all screen updates wait until it was all put in place. >This was

Re: [Lazarus] How to fix slow screen refresh of TListbox?

2022-11-11 Thread Luca Olivetti via lazarus
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