필터 지우기
필터 지우기

How to connect editable data from a GUI table to a pushbutton?

조회 수: 1 (최근 30일)
Flávio
Flávio 2013년 2월 7일
For example, the user can edit data in a GUI table, and then when he pushes a pushbutton 'save', the data is saved in a structure.
How can I program that?
Basically, I want to know how to relate the cell_edit_callback from table to the pushbutton callback.
Thanks

답변 (1개)

Image Analyst
Image Analyst 2013년 2월 7일
In the push button callback, have this code
tableData = get(handles.myTable, 'Data');
  댓글 수: 3
Flávio
Flávio 2013년 2월 7일
when you say 'push button callback', can it be in property inspector callback? And myTable means the name of the table, for example, uitable5?
Sorry for my ignorance!
Image Analyst
Image Analyst 2013년 2월 8일
Yes, it would be uitable5 or whatever it's called. When you right click on the button in GUIDE, and say to look at the callback, it throws you into the m-file where the actual callback code is located. That's the callback. It's in the m-file but you can get to it from the "goto" icon in the MATLAB ribbon, or you can get to it via right-clicking in GUIDE like I explained. You can even go to it from Property Inspector. The point is, they are all the same code, no matter how you get to it.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by