Skip to main content
tliao.1
Associate II
March 19, 2021
Question

is possible to use one modal window for multiple screens?

  • March 19, 2021
  • 2 replies
  • 960 views

the modal window is likes message box that I needed.

I have multiple screens in project, can I use a same modal window for all screens or I need to add a modal window into the every screen?

how to do that if all screens can share a same modal window?

is someone can tell me? thanks.

This topic has been closed for replies.

2 replies

HP_it
Senior II
March 19, 2021

The short answer is no - you cannot reuse the same modal window.

I think the easiest approach here would be to design a container with everything you need and then add that to the modal you want to show.

the long answer is that there is a way to re-use containers (or other widgets for that matter) but it's not straight forward.

Alexandre RENOUX
Visitor II
March 23, 2021

Hello tliao.1,

As HP mentioned, using custom containers are a possibility. Simply creating a modal window inside a custom container and adding the custom container to each screen. But in the end it will still be different instances of the "same" modal window since every widget in a screen are only alive/allocated when this screen is displayed. When changing screen the widgets are destroyed.

/Alexandre