How to show details of active cell ina a lable component of appdesigner in matlab?

125 Views Asked by At

enter image description hereI have created an app.UITable I choose A1(cell(1,1)) as the default active cell and I want to show it in a Lable and change it by some inputs. I tried :

    function UITableCellSelection(app, event)
        indices = event.Indices;
        app.SelectedCells = indices;
        app.activecellLabel.Text = app.SelectedCells

but it doesn't display anything. How can I set my active cell and display it in a Lable?

1

There are 1 best solutions below

3
On

You need to access the content of a table cell, not just the indices.

function UITableCellSelection(app, event)
    indices = event.Indices;
    app.SelectedCells = indices;
    app.activecellLabel.Text = app.UITable.Data{ indices(1), indices(2)};