Avatar of LeTay
LeTay

asked on 

Content of TListBox not "refreshed"

I have a Delphi (studio 10.1 Berlin) application where a TListBox component is on a TForm
When I click a button on the form, the process is to analyse data coming from some source, line by line. The result of the processing of each line is reflected with a line (a kind of "log" in fact) "written" in the TListBox (TListBox.Items.Add(...).
During the process, the form is visible on the screen but the TListBox remains empty until the process is completed.
I tried a TForm.Refresh each time a line is written in the TListBox, but the behavior remains the same.
How can I have the TlistBox showing all lines after each Items.Add call ?
Delphi

Avatar of undefined
Last Comment
Ferruccio Accalai
ASKER CERTIFIED SOLUTION
Avatar of Aditya Milan
Aditya Milan
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of LeTay
LeTay

ASKER

Will try that.
Thanks.
I guess your solution may be here...  http://drbob42.com/tip/tiphat04.htm 
regards
lopem
It could be also due to a beginupdate/endupdate calls.
If you call beginupdate before to start the adding process, you'll see the result just on endupdate. This is usually done to speed up the process skipping the list redrawing after any add.
Delphi
Delphi

Delphi is the most powerful Object Pascal IDE and component library for cross-platform Native App Development with flexible Cloud services and broad IoT connectivity. It provides powerful VCL controls for Windows 10 and enables FMX development for Windows, Mac and Mobile. Delphi is your choice for ultrafast Enterprise Strong Development™. Look for increased memory for large projects, extended multi-monitor support, improved Object Inspector and much more. Delphi is 5x faster for development and deployment across multiple desktop, mobile, cloud and database platforms including 32-bit and 64-bit Windows 10.

60K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo