Figure createfcn in app designer
Show older comments
I have an app that always creates an empty figure when I load it into appdesigner. It is quite annoying.
I realized after some debugging that it is caused by the createfcn property of the top figure, which has been set to a function that caused the window to open. When I deleted the function I got an error. The biggest problem is, I could not find any way to access the createfcn field from appdesigner.
The value of createfcn seems to have resulted from setting the default figure createfcn to a non-empty value when the app was created... After that point, it is saved in the app with no apparent way to change it.
To reproduce this problem, do something like
set(groot, 'defaultfigurecreatefcn', 'disp Hello')
and then create an app in appdesigner.
I suspect the same issue can happen with any of the default settings, especially createfcn's of various objects, that are not exposed in appdesigner.
I have an awkward workaround that I'll post as an answer, but any other suggestions are welcome.
Answers (1)
Adee
on 2 Dec 2021
0 votes
Categories
Find more on Install Products in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!