How do I get a Matlab UI (app) to call another UI so that it appears that my app has multiple pages?
Mostra commenti meno recenti
I am looking for a code example that will show me how to call another UI. I can not find any decent examples of this online. I have been trying to get a push button to call this other UI.
classdef App1 < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
UIFigure matlab.ui.Figure
Button matlab.ui.control.Button
end
methods (Access = private)
% Button pushed function: Button
function ButtonPushed(app, event)
% (WHAT GOES HERE TO CALL OTHER UI?) <----------------
end
end
% App initialization and construction
methods (Access = private)
% Create UIFigure and components
function createComponents(app)
% Create UIFigure
app.UIFigure = uifigure;
app.UIFigure.Position = [100 100 640 480];
app.UIFigure.Name = 'UI Figure';
setAutoResize(app, app.UIFigure, true)
%
% Create Button
app.Button = uibutton(app.UIFigure, 'push');
app.Button.ButtonPushedFcn = createCallbackFcn(app, @ButtonPushed, true);
app.Button.Position = [271 264 100 22];
end
end
end
Thank you to anyone who helps!
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Develop Apps Programmatically in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!