Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / gtk2 / 2009-05

I'm developing a program under Linux with gtk2.

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Denis Gottardello

I'm developing a program under Linux with gtk2. I think the graphic is a little ugly.
In my multithread program I use Synchronize() procedure to update a TMemo object.
By Synchronize() procedure the thread adds a few lines, but sometimes they do not appear correctly. I have to use the mouse scroll to read them all. If I add Application.ProcessMessage in the updating synchronized procedure, it displays all the lines correctly. However, the program becomes very slow. Do you think about? What can I do to improve my program?

Sorry for my bad English.

www.denisgottardello.it Skype: mrdebug Sviluppo software in Java, C++, Delphi, FreePascal su Linux e Windows. Assistenza su piattaforme Linux e Windows.

Reply by email

Mattias Gaertner
to Denis Gottardello
Show quoted text 11 lines
I'm developing a program under Linux with gtk2. I think the graphic is a little ugly. In my multithread program I use Synchronize() procedure to update a TMemo object. By Synchronize() procedure the thread adds a few lines, but sometimes they do not appear correctly. I have to use the mouse scroll to read them all. If I add Application.ProcessMessage in the updating synchronized procedure, it displays all the lines correctly. However, the program becomes very slow. Do you think about? What can I do to improve my program?

Call Application.ProcessMessages is the only supported way for painting. Call it only a few times a second by comparing 'Now' and the last time - otherwise your program will become slow.

Mattias

Reply by email