User input message box minimizes uifigure, how do I stop that from happening?

조회 수: 3 (최근 30일)
Bradley
Bradley 2024년 4월 14일
댓글: Voss 2024년 4월 15일
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
Bradley
Bradley 2024년 4월 15일
The code is nearly 2000 lines long so im not sure what part would be helpful to answer this question. I also am still learning the termonology of matlab and coding in general, thank you for answering my question. I stepped through the code from the beggining and its when the prompt line executes that the uifigure is minimized. I have to step into the function to get to this part of the code and its one of the first things the function does. Im not sure if any of that information matters here but its very confusing to me. Thanks again for the help!
Voss
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 CenterFile Exchange에서 Develop uifigure-Based Apps에 대해 자세히 알아보기

태그

제품


릴리스

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by