[Lazarus] TStaticText loses content at irregular intervals (Win 10)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] TStaticText loses content at irregular intervals (Win 10)

Free Pascal - Lazarus mailing list
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

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] TStaticText loses content at irregular intervals (Win 10)

Free Pascal - Lazarus mailing list
On Sun, Jan 17, 2021 at 8:46 AM Bo Berglund via lazarus
<[hidden email]> 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.
--
Bart
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] TStaticText loses content at irregular intervals (Win 10)

Free Pascal - Lazarus mailing list
On Sun, 17 Jan 2021 15:45:35 +0100, Bart via lazarus
<[hidden email]> wrote:

>On Sun, Jan 17, 2021 at 8:46 AM Bo Berglund via lazarus
><[hidden email]> 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

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] TStaticText loses content at irregular intervals (Win 10)

Free Pascal - Lazarus mailing list
On Sun, 17 Jan 2021 18:18:57 +0100, Bo Berglund via lazarus
<[hidden email]> wrote:

>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

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus