Push button on a table
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello. I'm having a problem with the push button. I opened and input dialog to ask how many rows I want in my table, and after that the table opens. The problem is that I want an OK button (or something like that), so after editing my table I can save that on a matrice to run some calculus. Is it possible to do that? Here is the what I've done yet.
% Number of rows
q = inputdlg('How many streams?');
% Opening figure
f = figure('Position', [125 125 400 400]);
% Creating uitable and editing it
t = uitable('Parent', f, 'Position', [25 25 350 350]);
set(t, 'ColumnName', {'Supply|Temperature|(°C)', 'Target|Temperature|(°C)', 'dT Min|(°C)', 'Heat Duty|(kW)'});
set(t, 'Data', zeros(str2double(q{1}),4));
set(t, 'ColumnEditable', [true true true true true])
Thanks.
0 commentaires
Réponse acceptée
Robert Cumming
le 28 Juil 2011
something like:
uicontrol ( 'parent', f, 'style', 'pushbutton', 'position', [25 0 350 20], 'string', 'PUSH', 'Callback', {@MyCallBack} )
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Creating, Deleting, and Querying Graphics Objects dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!