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!