uitable with logical cell (checkbox)

3 ビュー (過去 30 日間)
hu
hu 2013 年 12 月 10 日
コメント済み: Walter Roberson 2013 年 12 月 11 日
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 Center および File ExchangeElementary Math についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by