Clear Filters
Clear Filters

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)
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
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
Al in St. Louis on 17 Feb 2023
Edited: Al in St. Louis on 20 Feb 2023
Les,
Thank you. The thing is that this is a new problem for me. I'm certain I didn't have this issue with older versions of MATLAB. I also believe that in older versions of MATLAB, the font in the comparison window matched the font in the MATLAB editor. My taskbar has been at the top of the screen since I first started using WinTel boxes in 1996. Although I was using MATLAB from around 1990, I didn't have a GUI version of MATLAB until 2013. I used the comparison tool a lot until around 2020. Now that I'm using it again, it has this bizarre set of issues (mine and all that you listed). I'm sure someone at Mathworks believes that they've replaced the comparison tool with something newer, different, and "better."

Sign in to comment.

Accepted Answer

Walter Roberson
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
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.

Sign in to comment.

More Answers (1)

Suman
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.
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
Al in St. Louis on 17 Feb 2023
Here is a screenshot when my laptop is not connected to a dock or any external monitor. Remember, my question is how do I change the default position of the comparison window. I really doubt that throwing away all my preferences is going to change where this window shows up.
Al in St. Louis
Al in St. Louis on 17 Feb 2023
And here is the promised screenshot on my 20-inch monitor. As Les described in a comment on my question, the window is opening at the exact same place on three different monitors. Can you give me a command to enter in my start.m file to change the default position?

Sign in to comment.

Categories

Find more on Environment and Settings in Help Center and File Exchange

Tags

Products


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!