how to change nomber of rows in the ui table?

1 次查看(过去 30 天)
how to change number of rows in the ui table, using GUIDE properties editor in the *.fig file?
  2 个评论
Adam Danz
Adam Danz 2019-6-11
The question was edited after it was answered. It's now clear that you want to add rows to your UI table from the GUIDE interface.
I'll update my answer to include those instructions.
madhan ravi
madhan ravi 2019-6-12
Editing a question after someone has answered is not likely recommended.

请先登录,再进行评论。

回答(1 个)

Adam Danz
Adam Danz 2019-6-10
编辑:Adam Danz 2019-6-17
Add empty rows to the "data" property. Here's a demo.
data = get(handles.Table, 'Data'); % get the current data in your UItable
data{1,end+2} = []; %add two rows
set(handles.Table, 'Data', data); %assign the updated data back to your table
[update] There are several ways to add rows from the GUIDE interface. Right-click the UI table in GUIDE and select "Table Properties Editor".
One way is to select "Rows" on the left column; then "Show names entered below...." radio button, then use the "+ Insert" button to add rows; then "Apply".
Another way is to select "Data" on the left column; then "Change data value to the selected workspace...." radio button; and then select a workspace array that is the size you'd like.
Lastly, what I believe to be the simplest and cleanest option would be to set the "data" property from within the GUI code (follow the 3 lines of code I shared above). This could be done in the "guiName_OpeningFcn()" which is executed when the GUI is first created.

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by