Default position of comparison window when I use the Compare button in the Editor is off screen. Can it be changed?
Show older comments
Whenever I use the Compare button in the MATLAB Editor to compare two different .M files, the new window that opens to display the files' differences is off screen, and I have to use Alt+space to open the popup menu that allows me to move the window so that it becomes visible. Is there a way to alter the default location where this window will open?
4 Comments
Suman
on 13 Feb 2023
Hi Al,
I have tried to regenerate your issue on my desktop using MATLAB R2022a and R2022b, and I am able to get the new comparison window on top of all the windows for both the MATLAB versions.
There might be some issues with "prefdir" in your system. You may have a look at the following ML Answer for reference:
If it's still not resolved, can you please provide screenshot(s) and/or some more description of the issue?
Cheers,
Suman
Al in St. Louis
on 14 Feb 2023
Les Beckham
on 17 Feb 2023
I don't think this has anything to do with screen resolution. It is just a poorly designed tool.
The comparison window always opens in the same place and with the same size, which is all the way on the top of the screen in the upper left corner of the primary monitor (regardless of where my Matlab window is located). This isn't a problem for me because I have my Windows taskbar at the bottom of the screen.
Moving/resizing the comparison window has no effect on where it shows up the next time I use the tool.
Even though I don't have the problem that the OP has in being unable to move the window because it is hidden under the taskbar, I do find it annoying that I have to resize the window every time because it is too narrow to see the contents of the files being compared.
It also has too much space between the lines of text. Even maximized on a 1920x1080 screen it only shows 34 lines of text, while the Editor window shows 50 lines when maximized.
Also, I can't change the font to be able to see more text in the window.
Al in St. Louis
on 17 Feb 2023
Edited: Al in St. Louis
on 20 Feb 2023
Accepted Answer
More Answers (1)
Suman
on 15 Feb 2023
Hi Al,
As per my understanding, it's happening due to your monitor resolution and it may vary from system to system. In my system, the Compare window is appearing fully on-screen in both MATLAB R2022a and R2022b versions.
You may try the "prefdir" resolution which I mentioned earlier i.e., Try renaming the directory designated by
prefdir
command to something else while MATLAB is not running, and see if that fixes the issue.
Please have a look at the following ML Answer for reference: "Guide" window outside monitor's screen space - MATLAB Answers - MATLAB Central (mathworks.com)
The "prefdir" documentation page for reference: prefdir - MATLAB doc
I hope all these information will be helpful to you.
Cheers,
Suman
4 Comments
Al in St. Louis
on 15 Feb 2023
Al in St. Louis
on 15 Feb 2023
Al in St. Louis
on 17 Feb 2023
Al in St. Louis
on 17 Feb 2023
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

