Sign in Join

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

Mailing lists / lazarus / 2021-01

TStaticText loses content at irregular intervals (Win 10)

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Bo Berglund

Windows 10 Pro, Lazarus 2.0.10 (64 bit), Fpc 3.2.0 (64 bit)

I have an application where I have a panel on the bottom of the main form. On this I have a number of controls like buttons etc. There are a set of TStaticText controls where I show the current value of some variables that are set from buttons.
The application is a video editor and I snatch the position in the video through the buttons that save the value of current time in seconds and show these in the TStaticText containers. While doing this sometimes the values displayed for the next cut just disappear...

It is the *content* of these TStaticText controls that blank out and the values disappear...

When this happens I can return the values by simply moving the application form down so these controls disappear below the screen bottom edge and then pull the form up again. This repaints the content of the controls.

What could be the reason for this and is there anything I can do to stop it from happening?

Bo Berglund Developer in Sweden

Reply by email

Bo Berglund
to Bart
Bart wrote 8 lines
On Sun, Jan 17, 2021 at 8:46 AM Bo Berglund via lazarus wrote: > is there anything I can do to stop it from > happening? The "stupid"way is to try and call Apllication.PrecessMessages after you update the text of that control.

Well, this does not happen as a response to my program actions...

It is like this:
I have clicked the buttons a number of times to define the clips. Every time the number appears as expected.

Now I leave the application with the last clip defined in these controls to do
something else outside the application.

Then when I return to the application the TStaticText containers are visibly empty!
This is never done in the program itself, it always updates the controls with a text representation of a number...

But when the form is in this state not showing what is inside the controls I can just drag the form such that the part holding the controls is hidden outside of the screen and then pull it up again and voila! The text is again shown!

It seems like the *visual representation* of the TStaticText containers is not persistent in all cases.

Bo Berglund Developer in Sweden

Reply by email

Bo Berglund
to Bo Berglund
Bo Berglund wrote 7 lines
But when the form is in this state not showing what is inside the controls I can just drag the form such that the part holding the controls is hidden outside of the screen and then pull it up again and voila! The text is again shown! It seems like the *visual representation* of the TStaticText containers is not persistent in all cases.

Now it happened again and this time I looked closer and found that not only has the text inside the TStaticText disappeared, but also its border. So the panel is empty where the controls should be.
Again, moving that part of the form offscreen and then back in again restores the visibility...

How very strange...

Bo Berglund Developer in Sweden

Reply by email