uitable with logical cell (checkbox)

7 次查看(过去 30 天)
Hi,
How can I know which rows in a uitable with logical cell (checkbox) were selected (upon clicking a button)?
Thanks.

采纳的回答

Walter Roberson
Walter Roberson 2013-12-10
get() the Data property of the table and examine the respective cells.
  6 个评论
hu
hu 2013-12-11
I still not getting the row numbers (I run you code in a GUI). Can you please upload a full example. Thanks
Walter Roberson
Walter Roberson 2013-12-11
foo = uitable('Data', {false;true;true;false;false}, 'ColumnEdit', true);
Now click on the last entry. Then
data = get(foo, 'Data');
logical_vec = horzcat(data{:});
find(logical_vec)
You should now see that 1 and 4 are not in the list.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Elementary Math 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by