Borrar filtros
Borrar filtros

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

5 visualizaciones (últimos 30 días)
Bradley
Bradley el 14 de Abr. de 2024
Comentada: Voss el 15 de Abr. de 2024
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 comentarios
Bradley
Bradley el 15 de Abr. de 2024
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 el 15 de Abr. de 2024
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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Develop uifigure-Based Apps en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by