Gui#
- class Gui(NameValueArgs)#
Bases:
handleGuilightweight wrapper to launch and place App Designer apps.Instantiates an app by name (via
feval), positions the UI figure using preset strings or fractional coordinates/sizes, allows updating viaupdate(), and manages lifecycle withclose().Example:
g = Gui(name="MyApp", fpath="", loc=[0.1,0.1], size=[0.5,0.5]); g.initialize(42); % passes 42 as an argument to app constructor g.update(); g.close();
- Constructor Summary
- Gui(NameValueArgs)#
Construct a
Guifrom name-value arguments.- Parameters:
name (
string) – App class name (callable viafeval)fpath (
string) – Unusedloc (
string or double) – Location preset string or [xFrac,yFrac]size (
string or double) – Size preset string or [wFrac,hFrac]isEnabled (
logical optional) – If false, initialization is a no-op
- Property Summary
- App matlab.apps.AppBase#
- IsEnabled logical = true#
Master switch to disable operations
- Location#
UI position preset or [xFrac,yFrac]
- Monitor double = 1#
Target monitor index (1 is primary)
- Name#
App class name to instantiate (string)
- Size#
UI size preset or [wFrac,hFrac]
- Method Summary
- close()#
Close and delete the app instance if valid.
- initialize(varargin)#
Instantiate the app and place its UI figure.
Additional inputs are forwarded to the app constructor.
- Parameters:
varargin (
any optional) – Arguments passed to the app constructor
- update()#
Call the app’s
updatemethod if available.