Launch a desktop layout programmatically

12 visualizaciones (últimos 30 días)
Matt J
Matt J el 12 de Mayo de 2025
Comentada: TED MOSBY el 17 de Mayo de 2025
In the Environment seciton of the desktop's Home Tab, there is an area for saving and loading one's preferred desktop layouts:
What I'd like to know is, once you've created and saved a desktop layout, is there a way to launch it programmatically?

Respuesta aceptada

TED MOSBY
TED MOSBY el 13 de Mayo de 2025
Hi Matt,
As I understand from your question, you want to launch a saved desktop layout programmatically. For that you can run the commands shown below in MATLAB command window:
desktop = com.mathworks.mde.desk.MLDesktop.getInstance;
desktop.restoreLayout('fav');
Here "fav" is the name of the layout you had saved. Please note the commands are case senstitive.
Hope this helps!
  4 comentarios
TED MOSBY
TED MOSBY el 13 de Mayo de 2025
Editada: TED MOSBY el 13 de Mayo de 2025

It doesn't show such warning in my editor though but let me see some other workaround

TED MOSBY
TED MOSBY el 17 de Mayo de 2025
Couldnt find any other workaround, but you can use this for the time being!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Environment and Settings en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by