lock first app if second is running
Mostra commenti meno recenti
Hello,
how can i lock first app if secod is running.
I have the main app and one app which ask some input data from oprator. And i would like to lock main app during time when operator write some data to second one app. It should be locked, visibility is not solutions....
Thanks.
Tomas
3 Commenti
Jan
il 26 Apr 2019
What exactly is an "app" and what do you call "locking"? What is the "operator"?
Hello,
The app is aplication created in appdesigner. By first aplication (main app) is opened second one aplication where "operator" (somebody wo will works wit this aplication) will write some neccesary data. During this time i would like to lock the main app. Lock - in my case meaning disable whole main aplication until second one is running.
Tomas
Oliver Schön
il 14 Ago 2019
Hi,
same problem here but found an alternative solution:
- add an image component to overlay the complete main app window, e.g. app.BlankWindow, set ScaleMethod to 'strech'
- set its properties Visible and Enable to 'off' on creation
- in the main app StartupFcn initialise app.BlankWindow.ImageSource = ones(1,1,3)*0.5 (i.e. single pixel grey image)
- when starting a dialog box set the image Visible and Enable to 'on', now no clicks go through to the main app (unless you add an ImageClickedFcn callback)
- when the dialog exits set the image properties back to 'off'
This mimics the uiconfirm dialog function except that it does not restrict the dialog window to the frame of the main app.
Cheers,
Oliver.
Risposta accettata
Più risposte (1)
Itshak
il 30 Gen 2024
1 voto
For anyone still looking for a solution in 2024. The component browser panel has an option to set the UIFigure Window Style to modal. Upon setting this value if a secondary app is launched from a primary modal app, the primary modal app will be uninteractable as long as the second one is open.
Categorie
Scopri di più su Develop uifigure-Based Apps in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!