MATLAB Answers

Is there a way to re-title the Matlab Editor window?

2 views (last 30 days)
Matt J
Matt J on 14 Oct 2020
Edited: Mario Malic on 20 Nov 2020
Sometimes, I have multiple Matlab instances open and within each of those, an undocked Matlab Editor window. It would be helpful to me if I could change the title bar of each editor window to something other than "Editor" so that I could label them more distinctively, and know at a glance which Matlab instance I am working in. Does anyone know if there is a way to accomplish this?

  2 Comments

Mario Malic
Mario Malic on 14 Oct 2020
Hi Matt, I have some clues to help you with as I wasn't able to do it.
Method 1:
Answer here is quite helpful,
desktop = com.mathworks.mde.desk.MLDesktop.getInstance;
If you open the editor in undocked mode, evaluate the line in it
wEditor = desktop.getSelected;
You can further inspect methods of it to check
methods(wEditor)
You'll see some methods that may (or may not) help. I am not good with OOC, so I don't know how to dig deeper within methods. Maybe someone else will contribute in the meantime.
Method 2:
doc matlab.desktop.vareditor.VariableEditor
There's a method called setWindowTitle, but wouldn't know how to use it.
Method 3:
Maybe change background color of each MATLAB instance so you can differ them.
Matt J
Matt J on 20 Nov 2020
Method 3: Maybe change background color of each MATLAB instance so you can differ them.
That sounds like a good alternative. If you submit it as an answer, I will Accept it.

Sign in to comment.

Accepted Answer

Mario Malic
Mario Malic on 20 Nov 2020
Edited: Mario Malic on 20 Nov 2020
Method 3:
Maybe change background color of each MATLAB instance so you can differ them.
Short expansion on comments above,
desktop = com.mathworks.mde.desk.MLDesktop.getInstance;
If you open the editor in undocked mode, evaluate the line with F9
jEditor = desktop.getSelectedClient;
jEditorGroup = jEditor.getGroup;
By using uiinspect on jEditor and jEditorGroup it's possible to see these these values you're looking to change.It's not possible to change them, as it looks like those values are determined on the new file creation or loading.

  0 Comments

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!