cancel
Showing results for 
Search instead for 
Did you mean: 

How to call a same ModelWindow in different pages by press a hardware button.

xchen.1480
Associate II

My system have tens of pages, and have 3 hardware buttons to change the LCD backlight.

When change the backlight, it is needed to display a small window on the current page.

After finished the changing, the small window closed.

I know I can create ModelWindow in each page, and display it in handleKeyEvent.

In this case, I need to create the same code for each page. It must be very hard.

Is there any simple method to do it?

Thanks!

13 REPLIES 13

Hello, I've make the pop window as a common window, but with a very little problem:

Because the pop window is defined and add to page before other widgets, so the pop window is covered by other widgets​.

Is there a method can change Z-order of a widget ?

There is. In the same way that you can "add" a widget to the root container, you can also remove it.

remove(a);
add(b);
add(a);

Thank you very much!

It is a method to do it, but I think it will be better if TouchGFX can give a function, like setToTop().​ :D

And 2 more question:

*********************************************

I used TouchGFX both in company and home. When I modify somewhere in designer and generate code, it will update the modified page on my company PC, so it is very quick to be done. But the same actions, it will update all codes on my home PC, even I only change a text.

What wrong with the setting?

*********************************************

TouchGFX Designer will update to support Common Window talked about in this topic?

setToTop() is simply add() :) DONE! That was easy, phew!

additional q1) I don't know, i can't really tell without knowing more, seeing some projects or video of what's going on

additional q2) Yes. For now, check the answer i gave. I'm working on a little tool that i will publish to the community that will allow you to group views together with common functionality and view code by adding it to the post-generate command. more info later.

/Martin