SHOWINFOWINDOW creates a small dialog window which displays a user-defined message. It is quite like MATLAB's msgbox but without an OK button. Although msgbox could be used for the simple display of a message that informs the user about a process being performed (and is not expected to last long, else a waitbar/timebar could be used but at a cost of running time), the presence of the OK button that closes the window on press could be annoying. SHOWINFOWINDOW resolves this problem by removing the button. Additionally, if you wish to write a script or create a GUI where you do not wish the user to accidenatlly hit the close button in the upper right corner of the window, you can remove the comment on line 82 of the code concerning the 'CloseRequestFcn' property of the dialog. However, if you do that you must assign a handle to showinfowindow so you can change its 'CloseRequestFcn' property to 'closereq' when your process is done or else you might end up with a non-closing window! If that happens, one way to resolve this could be to use the findobj function:
non_closing_window_handle = findobj('CloseRequestFcn','');
Although this script was created for something trivial, I found it useful especially in my GUIs where I wanted to briefly display some information in a very simple way and especially when I wanted to avoid someone causing such windows to close when running a process within a GUI, probably resulting in errors. Further help on its usage with some syntax examples can be found inside the code.
Very useful. I made a minor change.
Since you switch the location of the dialog box after it's made visible, I am able to momentarily see it before it swithces position which is not desirable.
I added "'Visible','off'" to the "Initialize dialog window" and then set the visibility back to on at the end of the script.
Function is OK. However it briefly displays a figure before displaying the message.
I personally preferthe easier option to use msgbox with the OK button not visible:
great work! however, may i know how to modify the background color and the message color as well.?
Exactly what I was looking for. Thanks!
Mr. Panagiotis obviously hasn't had other people use his matlab programs. Submission is exactly what I'm looking for ..... seems like Matlab would incorporate this as an option on msgbox
Mr. Panagiotis said: "...something trivial."
It's true! it's very trivial.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.