find handle to uialert/uiconfirm windows/boxes

20 views (last 30 days)
朱利安·施密德(Julian Schmid)
Edited: Sean de Wolski 在2021年9月10日
Hi,
I have a problem using the uialert/uiconfirm functionality.
我的问题的简短版本是:有没有一种方法可以找到Uialert/Uiconfirm Windows/boxes并在不再需要的情况下以编程方式关闭它们?我不想关闭底层尿道。
长版本:
目前,我正在使用GUI(使用新的AppDesigner/ Uifigure Utilities)进行程序来控制仪器。设置如下:
该仪器通过MATLAB程序从串行接口中获取命令并执行它们。该仪器有2个按钮:一个按钮,允许用户在紧急情况下停止仪器,另一个可以继续操作。当这些按钮之一按下时,仪器状态标志更改(hold = on/off);
另一侧的程序根据用户输入将命令发送到仪器。在发送新命令之前,它会搅拌仪器状态标志,以确定是否持有IS列表状态= OFF并准备执行下一个命令。如果标志更改为保持= ON,则程序使用Uialert/UiconFirm功能来通知用户并通过GUI阻止其他输入。
Once the Hold = on flag was triggered, there are two ways to disable it; eigther by pressing the instrument button or using the uialert/uiconfirm option button. If the user desides to press the instrument button, which I can monitor using a timer function querring the instrument state flag, I have the uialert window to be removed. Unfortunatly these functions do not return a handle or any other identification property which I could use to close the alert window. Do you have any idea how to work around this problem?
Thank you for your time and help in advance!
2条评论
朱利安·施密德(Julian Schmid)
我只想获取对使用uialert()函数时在uifigure窗口中弹出的小窗口的访问。例如, d = uiprogressdlg(f) ,,,, D是我可以用来修改或关闭对话框的进度条的手柄。但是,这与uialer()函数不起作用,因此创建它后我无法对其进行修改,并且必须等到用户通过按下按钮触发响应。

登录发表评论。

答案(1)

Sean de Wolski
Sean de Wolski 2020年4月22日
Edited:Sean de Wolski 在2021年9月10日
EDIT September 2021:
In 21a you can dismiss and alert with:
Original:
我认为不可能做到并做您的要求。
话虽如此,我质疑一个应用程序出现和消失的应用程序的可用性。我认为可能有一种更好的方法来解决这个问题。也许只有一个常规的Uiswitch带有相应的Uilamp显示是否正在运行。
1条评论
朱利安·施密德(Julian Schmid)
Well, I was thinking of using the msgbox() function to do something like that but according to the documentation it is recommended to "To create a 模态 alert dialog box for single-window App Designer or uifigure - 基于应用程序,使用 Uialert 函数。”。
我已经实现了一个指示马钦州的灯,但是不幸的是,有很多乐器状态(我无法更改),我认为很多不同的灯颜色可能会使用户陷入困境。因此,我认为一个带有明确信息的窗口,其中发生了什么以及如何修复可能会更有帮助的窗口。

登录发表评论。

s manbetx 845


Release

R2020a

Community Treasure Hunt

在Matlab Central中找到宝藏,发现社区如何为您提供帮助!

Start Hunting!

Translated by