Skip to main content
xchen.1480
Associate II
January 9, 2020
Solved

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

  • January 9, 2020
  • 13 replies
  • 2608 views

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!

This topic has been closed for replies.

13 replies

Martin KJELDSEN
Principal III
January 9, 2020

There is a way of doing this by having a "base view" for a group of screens - I'm so behind on this, i promised i would do an example for the community. It's a bit more difficult with the designer because all views already have a base-class (generated by designer).

So what this would enable you to do is from a view that are a part of this group will simply have access to a presenter method to show some dialogue or adjust the backlight.

/Martin

xchen.1480
Associate II
January 9, 2020

Thank you.

I'll wait for your example, and do the other works in my project at the same time.

I hope to receive your reply again when you finish it.