Check if New Desktop addon is used in current session

Is there a way to check programmatically if in the New Desktop is active in the current session (I want to detect this info in a startup file)?

7 comentarios

@Marco Pasquali, may I ask out of curriousity how you would use the information about whether MATLAB is running in the new desktop? What would your startup file do differently for the new desktop?
At first I wanted to execute the line that disable the "Show Code" panel in th new figure UI only when the new desktop is used (probably executing with the "old" desktop it's not a problem, but who knows). But then I discovered an important bug (for me) in the new desktop, and I was thinking if it was possible to write a simple workaround when the new UI is used.
Just for info, the issue in question is that with the new desktop the warning that prevent closing the main window, asking for confirmation, is not active even if selected in the options (I've already send a feedback to the team).
Thanks for the description, @Marco Pasquali. Thanks for sending the feedback!
sst
sst el 26 de Jun. de 2024
Just checking on this one, do we have a way to identify the desktop type programmatically?
@sst, short answer is no but it would be helpful to know how you would use that information. There may be a workaround or another way to identify what you're looking for.
sst
sst el 26 de Jun. de 2024
In my specific case, I would like to use unicode characters for the "listbox" uicontrol, which works only in the New Desktop mode, and not in the classic desktop mode. The classic desktop mode, on the other hand, allows the use of HTML content in the uicontrol, but not unicode characters. This is part of a much larger application.
Thanks for this info @sst.

Iniciar sesión para comentar.

 Respuesta aceptada

To confirm programmatically whether the new MATLAB desktop add-on is active in the current session, you can use the rendererinfo command. Specifically, check the GraphicsRenderer field by running the following command:
rendererinfo().GraphicsRenderer
If the output is 'WebGL', it indicates that the session is utilizing the new desktop add-on.
For more details about the rendererinfo command, you can refer to the MATLAB documentation::

Más respuestas (0)

Categorías

Más información sobre Environment and Settings en Centro de ayuda y File Exchange.

Productos

Versión

R2024a

Etiquetas

Preguntada:

el 24 de Mayo de 2024

Comentada:

sst
el 10 de Dic. de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by