How to create gui objects based on user input??(dynamically)
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
for example if user inputs 5 in a edit text box then it must display 5 edit text boxes from which i can collect data...
0 Kommentare
Akzeptierte Antwort
Sean de Wolski
am 7 Dez. 2011
How about using a uitable instead?
doc uitable
Else use a for-loop to build n edit boxes where n is constrained to be below some large number.
3 Kommentare
Sean de Wolski
am 7 Dez. 2011
Then change their 'visible' property 'on'/'off'. But let me reirterate - I think a uitable or perhaps an input dialog (doc inputdlg) are a better approach.
Weitere Antworten (1)
Walter Roberson
am 7 Dez. 2011
edit_handles = zeros(n,1);
for K = 1 : n
edit_handles(K) = uitable('Style','edit','Units','normalized', [(K-1)/n, 0, 1/n, 1]);
end
Siehe auch
Kategorien
Mehr zu Variables finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!