User input message box minimizes uifigure, how do I stop that from happening?
3 次查看(过去 30 天)
显示 更早的评论
Im not sure how best to describe my issue but im trying my best. I have a uifigure with some checkboxes, drop down menus, and buttons. One thing I need to do is convert between unix time and hours:minutes:seconds. When you open the program you can select some options and eventually click run, the data is in unix seconds so it needs to be converted first, so the program is open and you click run and the message box pops up, you input the year, month, and day and the conversion happens. everytime I run the program and the message box pops up it minimizes the uifigure, its annoying and im trying to find a fix. Any ideas on why this happens? Below is the message box code:
prompt = {'Year:','Month:', 'Day: '};
dlgtitle = 'Input';
fieldsize = [1 45; 1 45; 1 45];
answer = inputdlg(prompt,dlgtitle,fieldsize);
When I go step by step, the uifigure minimizes when I reach the prompt line, is there something I have here that automatically minimizes other figures? All this is within a function that calculates different things depending on the checkbox options. Is there a way to stop the uifigure from minimizing? Thanks!
3 个评论
Voss
2024-4-15
If you would, please upload the entire code here (in a ZIP file if it's many files), using the paperclip button, and I'll see if I can reproduce the problem in my copy of R2023b or see any reason why this might be happening.
At the very least, it's likely there's an easy workaround, which is to restore the uifigure after it's minimized, by calling the figure() function on it.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop uifigure-Based Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!