Single Selection in Uitable

7 次查看(过去 30 天)
Stéphanie
Stéphanie 2021-2-4
评论: Voss 2021-12-26
Hi,
Is there a way to force Single Row Selection in a uitable (new version with appdesigner) ?
I use a table to show properties (in columns) of a list of objects (in rows). I want that the user selects one (and only one) object and uses some push buttons to edit / suppress / compute the object (As edit or compute callbacks open a dialog box, i don't want that several dialog boxes open if the user selected serveral objects).
Stéphanie.

回答(1 个)

Mario Malic
Mario Malic 2021-2-4
Hi,
you can't force it, but you can validate the selection.
Event.Indices returns n by 2 array (row, column). If all elements in the first column are equal then the selection is valid and you can continue with the computation. Otherwise, issue a warning with uialert.
  5 个评论
Voss
Voss 2021-12-26
Yes MATLAB uitables are really essentially useless pieces of garbage, unfortunately, for all but the most rudimentary applications.

请先登录,再进行评论。

类别

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

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by