Code covered by the BSD License  

Highlights from
Specifying questdlg position

5.0

5.0 | 3 ratings Rate this file 13 Downloads (last 30 days) File Size: 5.25 KB File ID: #31044
image thumbnail

Specifying questdlg position

by Saeid

 

14 Apr 2011 (Updated 22 Apr 2011)

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

| Watch this File

File Information
Description

‘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?' );

MATLAB release MATLAB 7.11 (2010b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
22 Apr 2011 Amanda Wallace  
22 Apr 2011 Amanda Wallace

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!

14 Oct 2011 TAFKARS

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

07 Dec 2011 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!

Please login to add a comment or rating.
Updates
22 Apr 2011

Just some help lines are added to the code.

Tag Activity for this File
Tag Applied By Date/Time
questdlg Saeid 14 Apr 2011 15:54:46
position Saeid 14 Apr 2011 15:54:46

Contact us at files@mathworks.com