how to change nomber of rows in the ui table?

1 Ansicht (letzte 30 Tage)
Victor Brouk
Victor Brouk am 10 Jun. 2019
Bearbeitet: Adam Danz am 17 Jun. 2019
how to change number of rows in the ui table, using GUIDE properties editor in the *.fig file?
  2 Kommentare
Adam Danz
Adam Danz am 11 Jun. 2019
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 am 12 Jun. 2019
Editing a question after someone has answered is not likely recommended.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Adam Danz
Adam Danz am 10 Jun. 2019
Bearbeitet: Adam Danz am 17 Jun. 2019
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.

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Produkte


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by