Effacer les filtres
Effacer les filtres

how to add the results of the checkbox to the table.

4 vues (au cours des 30 derniers jours)
aveks Gebastyan
aveks Gebastyan le 4 Août 2018
Commenté : Adam Danz le 13 Août 2018
Help me. I have 5 checkboxes, when I click the first checkbox the results will be displayed in the table. the problem is, when I click the second checkbox, the second checkbox results, appear in the table but replace the first result ... can anyone help me ...
// checkbox1 this is true or false?
a= get(hObject,'Value');
if a==1
set(handles.uitable1,'data',{'Bercak', '1', '0';})
else
set(handles.uitable1, 'data', '');
end

Réponse acceptée

Adam Danz
Adam Danz le 5 Août 2018
When you set the uitable data, you're setting the entire table, not just one line of the table.
For example, in this line from your code:
set(handles.uitable1,'data',{'Bercak', '1', '0';})
The entire data table will be just that 1 row.
Instead, you need to read each checkbox and write the entire table including all rows. If you need help with that let me know.
  5 commentaires
aveks Gebastyan
aveks Gebastyan le 13 Août 2018
yes is true. I want, when I click first checkbox and then the result is in the first row in the uitable, and when I click the second checkbox, the result is in the second row in the uitable. etc.. when I click unchecbox to the checkbox, then result in uitable clear one by one according to how much we uncheckbox to the checkbox.
sorry MR.i'm troubling you.. thanks for answer all my question..God bless to you.
Adam Danz
Adam Danz le 13 Août 2018
I don't mind helping at all. :) But I'm having a little trouble understanding what you want to do.
When you check a checkbox, what data goes into the table? Where does your GUI get the data from?
Could you write out a simple example of what would happen when I check and uncheck a few boxes?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Workspace Variables and MAT-Files 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!

Translated by