Single Selection in Uitable

조회 수: 2 (최근 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
Mario Malic
Mario Malic 2021년 2월 4일
Would be nice, yes.
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에서 Develop Apps Using App Designer에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by