How to select a table row rather than cell?

조회 수: 1 (최근 30일)
Joseph Areeda
Joseph Areeda 2012년 2월 1일
I have a list of objects with multiple identifying parameters to present to the user for selection (one or more).
My 2 choices seem to be:
  • Present as a list which means format the parameters into a line, then parse the selection
  • Present as a table, where alignment and separation of parameters is easy but I can't figure out how to select a whole row (signifying the object) rather than a cell (signifying a parameter).
This comes up several times in this project so I prefer the Table method but can live with the List method.
I found a news group article that uses findjobj to get the underlying JTable but that function doesn't seem to be in R2011b.
I can't seem to find a way to do any of the following:
  1. Use GUIDE to say I only want to select rows
  2. On the select call back, select all the columns in that row
  3. Get a handle to the underlying JTable to call setColumnSelectionAllowed(false) and setRowSelectionAllowed(true)
  4. Think of another mystic incantation to do this.
Any help is greatly appreciated.
Joe

답변 (1개)

Walter Roberson
Walter Roberson 2012년 2월 1일
findjobj() is a MATLAB File Exchange contribution; see http://www.mathworks.com/matlabcentral/fileexchange/14317
  댓글 수: 1
Joseph Areeda
Joseph Areeda 2012년 2월 14일
Thank you Walter.
I just wanted to update the status.
For a while the download link on that page was broken. A broken link report got it fixed but not in time to meet my needs so I ended up changing my widget to a list box.
I did google and find an old version of findjobj which did not work with R2011b.
When I get this thing released I will test the latest version.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by