classdef test2 < matlab.apps.AppBase
properties (Access = public)
UIFigure matlab.ui.Figure
EditFieldLabel matlab.ui.control.Label
EditField matlab.ui.control.NumericEditField
end
methods (Access = private)
function createComponents(app)
app.UIFigure = uifigure('Visible', 'off');
app.UIFigure.Position = [100 100 517 163];
app.UIFigure.Name = 'MATLAB App';
app.EditFieldLabel = uilabel(app.UIFigure);
app.EditFieldLabel.HorizontalAlignment = 'right';
app.EditFieldLabel.Position = [343 28 56 22];
app.EditFieldLabel.Text = 'Edit Field';
app.EditField = uieditfield(app.UIFigure, 'numeric');
app.EditField.Tooltip = {'This is a tooltip'};
app.EditField.Position = [476 28 38 22];
app.UIFigure.Visible = 'on';
end
end
methods (Access = public)
function app = test2
createComponents(app)
registerApp(app, app.UIFigure)
if nargout == 0
clear app
end
end
function delete(app)
delete(app.UIFigure)
end
end
end