Today gui can be developped within figure or uifigure. It may be useful to write codes which are compatible with the two alternatives, according to user preference for example.
In this case, it is frequently necessary to check if the current graphical object is a figure or uifigure or its figure ancestor. The short function isuifigure answers to the question.
For example:
hf=uifigure;ax=axes(hf);
isuifigure(hf) or isuifigure(ax) gives true
hf=figure;ax=axes(hf);
isuifigure(hf) or isuifigure(ax) gives false
(not tested on macOS or Linux platform)
Zitieren als
Alain Barraud (2024). isuifigure (https://www.mathworks.com/matlabcentral/fileexchange/111850-isuifigure), MATLAB Central File Exchange. Abgerufen .
Kompatibilität der MATLAB-Version
Erstellt mit
R2022a
Kompatibel mit R2016a und späteren Versionen
Plattform-Kompatibilität
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.0.0 |