How to disable minimize option in message box

Hi ,
I am doing an project where i display a message box for information , but my problem is that user can minimize that msg box & continue their work . I want to disable minimize option . How can i achieve it.?
Regards, Siddu

Antworten (3)

Matt Fig
Matt Fig am 20 Aug. 2012

0 Stimmen

If you are getting information, you might want to consider an iputdlg box.
N = [];
while isempty(N)
N = str2double(inputdlg('Enter a number from 1 to 10',...
'Number',1,{'5'}));
end
With this, the user cannot move on until he pushes Ok. Otherwise, look at setting the windowstyle property to modal and using UIWAIT.

2 Kommentare

Hi, your code is for input dialogue , but i am displaying message box . Is there any code for that .?
Matt Fig
Matt Fig am 20 Aug. 2012
Like I said, you can still set a message box to modal and use uiwait. Did you give this a try??

Melden Sie sich an, um zu kommentieren.

Jan
Jan am 20 Aug. 2012

0 Stimmen

You can use waitfor, uiwait and the 'modal' flag when creating the message box, see doc msgbox.
Image Analyst
Image Analyst am 20 Aug. 2012

0 Stimmen

I don't think you can with the built-in msgbox() function. Even with uiwait, modal, etc. there is still the minimize icon in the title bar. You might look at Yair's site: http://undocumentedmatlab.com/ Other than that, all I can suggest is to write your own GUI for it.

1 Kommentar

Jan
Jan am 20 Aug. 2012
You cannot continue the work, when a modal dialog blocks the execution. Otherwise "modal" would be meaningless, when I understand the term correctly.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu App Building finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 20 Aug. 2012

Community Treasure Hunt

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

Start Hunting!

Translated by