Page 1 of 1

invalidating the treeControl after minimizing the application

Posted: 25 Apr 2022 14:14
by B.Hooijenga
Hello, Thomas,

I have been using the treeControl for several months now and so far it has worked very well.

However, one issue is not ok , namely invalidating the treeControl after minimisation of the application.

I can demonstrate my problem using the treeControlDemo from the examples.

Please, have a look.,
After calling the program, select in the menu: demo2-objecttree
Then do for example as in the following picture:
treeControlDemo1.PNG
treeControlDemo1.PNG (6.89 KiB) Viewed 27570 times
Maximise and minimise the application using the icons in the title bar of the application.
Afterwards the program is of course only visible in the taskbar of windows.

After recalling it via the taskbar icon, this is the result:
treeConrolDemo2.PNG
treeConrolDemo2.PNG (4.45 KiB) Viewed 27570 times
I thought a solution should be simple, but could not find it.
What do I miss?

Kind regards
Ben

Re: invalidating the treeControl after minimizing the application

Posted: 26 Apr 2022 11:45
by Thomas Linder Puls
I can reproduce the problem. I also notice the following (don't know what it means):
  • The problem only occurs for the active window: if there are several tree demo windows open only the active has the problem
  • The nodes appear again if I move the mouse over them (i.e. over where they should have been).
I don't know why this happen, and I don't see it in other places where we use the tree control. I will ask people with more GUI knowledge if they know the phenomena (and a solution).

I guess that a "fake" invalidate would solve the problem, but it seems like a wrong (and unnecessary) thing to implement.

Re: invalidating the treeControl after minimizing the application

Posted: 27 Apr 2022 11:09
by Thomas Linder Puls
By some kind of luck I have been able to solve the problem. It turns out that it is the toolbar/status bar that cause the problem. I don't have the slightest idea why.

If you use the attached vpiToolbar.pro file instead of the one in the release the problem will go away.

Re: invalidating the treeControl after minimizing the application

Posted: 28 Apr 2022 8:43
by B.Hooijenga
Hello Thomas,

Wonderful :D

I tested it also in my own program and it works.
Thanks very much.

Kind regards,

Ben