Default position of comparison window when I use the Compare button in the Editor is off screen. Can it be changed?
1 view (last 30 days)
Show older comments
Al in St. Louis
on 9 Feb 2023
Commented: Walter Roberson
on 20 Feb 2023
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
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.
Accepted Answer
Walter Roberson
on 20 Feb 2023
Can you give me a command to enter in my start.m file to change the default position?
No, we cannot give you a command for that.
The code to lauch the tool is hidden inside a .p file toolbox/comparisons/mldesktop/matlab/visdiff.p . We do not know what it does. You will need to open a technical support case.
1 Comment
Walter Roberson
on 20 Feb 2023
I might have missed something hidden in the code or settings, but when I searched through the data structures that store preferences, and searched through the code for preference setting, I did not find any preference that stores position information for that window.
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
See Also
Categories
Find more on Environment and Settings 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!