Assign a customized image to an icon on the Quick Access Toolbar

조회 수: 7 (최근 30일)
Matt J
Matt J 2024년 1월 26일
댓글: Matt J 2024년 1월 26일
I have created two Quick Access Toolbar buttons that let me toggle between two desired Matlab Desktop layouts, one which arranges the panes in a certain way when the Editor is docked, and one when the Editor undocked:
However, it is unappealing to me that both use the same visual icon . I would like to assign alternative and distinct images to each of these icons.
I notice that the custom Quick Access Buttons are configured with .xml files in the prefdir. I have attached the .xml.zip for my "Docked" button as an example. I was wondering if there is something in the file that I could add or modify to change the icon image. I am looking for tags that dictate the current image, but cannot determine which it is.
Does anyone know if/how such a customization could be made?

채택된 답변

kei hin
kei hin 2024년 1월 26일
편집: kei hin 2024년 1월 26일
Right click on your Quick Access Toolbar button, then edit the icon you want in command edit window.
In R2019b, command below will be found in a xml file named with FavoriteCommands. Change 'favorite_command' to the icon image file path you want.
<callback>clear;clc</callback>
<icon name="favorite_command"/>
  댓글 수: 5
kei hin
kei hin 2024년 1월 26일
Sorry I misunderstood your post. layout button is not a command...
Matt J
Matt J 2024년 1월 26일
Ahah, but this FEX download,
makes it possible to activate a layout with a Matlab command, and therefore to do the same using a Favorite action.
Thanks!!!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Desktop에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by