File Exchange

image thumbnail

Specifying questdlg position

version 1.2 (5.25 KB) by

‘MFquestdlg’ enables you to specify the question dialog box location on the screen.

7 Ratings



View License

‘MFquestdlg’ is just a simple modification of ‘questdlg’ which enables you to specify the position of questdlg on the screen.
Everything is like the original ‘questdlg’, except that you need to determine your desirable position of the dialog box.
Specify the position with a two-element vector of the form:
[left, bottom]
where ‘left’ and ‘bottom’ define the distance from the lower-left corner of the screen to the lower-left corner of the question dialog box. ‘left’ and ‘bottom’ are NORMALIZED units, obviously between 0 and 1. The position vector must be added as the first element of ‘MFquestdlg’. An example could be:
button = MFquestdlg ( [ 0.6 , 0.1 ] , 'Is the position proper?' , 'Is it OK?' );

Comments and Ratings (8)

kai blume


Used it to turn off the modal WindowStyle and it worked. Thanks

thanks for this usefull soft.
I tried to modify it to get it to work with multiple screen (using get(0,'MonitorPositions' instead of get(0,'ScreenSize')) but did not succeed

Kevin J. Delaney

Just what I needed!

John Clayton

This is exactly what I was looking for! Thanks so much, it was clearly described and worked well for me. I made one small modification - adding a new argument which allows loading an arbitrary image into the icon. If the image file is not found, then the standard icon is used. Once again, I appreciate this!


Outstanding effort, thank-you. Does exactly what it says on the tin...

Brilliant... thanks... exactly what I was looking for. I had rather clumsily edited the original function to give a different fixed position but this allows multiple different positions easily. My only comment is: can you add the description text above into the help section in the function? I downloaded it without reading the above and it took me a while to realise that the position was normalised - the box kept appearing in the top right corner of my screen because I used values greater than one!



Just some help lines are added to the code.

MATLAB Release
MATLAB 7.11 (R2010b)
Tags Add Tags

Inspired: Specifying icon in questdlg

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video