Effacer les filtres
Effacer les filtres

Access the name of a ui in the code -- Simple question?

1 vue (au cours des 30 derniers jours)
Douglas Anderson
Douglas Anderson le 3 Déc 2016
Commenté : Walter Roberson le 3 Déc 2016
Hello!
This may be obvious, but I am writing GUIDE code for a gui, and want to access the name of the ui within the code (for a file name). Is it "handles.ui_name" or something simple like that? GUIDE puts it all through the code, prepending it to, for example, _OpeningFcn.
Thanks!
Doug Anderson

Réponse acceptée

Image Analyst
Image Analyst le 3 Déc 2016
Double click on your figure in GUIDE. Then go to the "name" property and type in some name for it. Then look at the "tag" property. Let's say you gave it a "tag" property of figMainWindow. Then to get it the name property, do this:
thisFiguresName = handles.figMainWindow.name;
  1 commentaire
Walter Roberson
Walter Roberson le 3 Déc 2016
Note: this syntax requires R2014b or later.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by