How to save an icon made in GUIDE toolbar editor?

4 visualizaciones (últimos 30 días)
Csaba
Csaba el 19 de Nov. de 2019
Respondida: Payas Bahade el 28 de Nov. de 2019
I have an icon, made by myself, in one of my (GUIDE) programs. I would like to have the same icon in another program. I could not find out how to copy, save the icon I already have. Only import is possible, save is not possible.
Also I could not copy CData through "Inspector".
Is there any way?

Respuestas (1)

Payas Bahade
Payas Bahade el 28 de Nov. de 2019
Hi Csaba,
Custom icon made in icon editor of GUIDE can be saved by following steps mentioned below:
  1. Open the App in which your custom icon is present.
  2. By using ‘findall’ save all graphic objects handles.
  3. Save ‘CData’ of require icon into a new variable by indexing to the require graphic object’s CData.
  4. Save this new variable as ‘.mat’ file.
  5. Import this ‘.mat’ in ‘iconeditor’ of GUIDE to use you customized icon.
Sample Code:
myApp; % Opening App which as customized icon which needs to be saved for resuse
h=findall(myApp); % Saving all graphic object handles of App ‘myApp’ into ‘h’
iCData=h(4).CData; % Indexing to required graphic object and saving it's CData into variable 'iCData'
save('myIcon.mat','iCData')% Saving variable 'iCData' as 'myIcon.mat'
Hope this helps!

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by