User defined edit fields in matlab app
1 次查看(过去 30 天)
显示 更早的评论
I would like to create a user defined edit fields in matlab app. Example if i enter 5 it should show 5 numerical edit fields, similarly for any defined number. Is it possible
0 个评论
采纳的回答
Ameer Hamza
2020-5-15
Check the code in attached app.
6 个评论
Ameer Hamza
2020-5-15
The following screenshots show the components and the code view. The code is also written as text below
properties (Access = private)
editFieldsH % Description
end
methods (Access = private)
% Button pushed function: CreateButton
function CreateButtonPushed(app, event)
pos = [100 420 100 22];
value = app.Num_fieldsEditField.Value;
delete(app.editFieldsH);
app.editFieldsH = gobjects(1,value);
for i=1:value
app.editFieldsH(i) = uieditfield(app.UIFigure, ...
'Position', pos - [0 40*i 0 0]);
end
end
end
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!