uicontrol(tableHandle)

조회 수: 12 (최근 30일)
Won-Mean Lee
Won-Mean Lee 2015년 12월 18일
댓글: Won-Mean Lee 2015년 12월 18일
I am trying to set focus to a uitable using uicontrol(), but am getting this error:
Error using uicontrol
While setting the 'Parent' property of 'UIControl':
Table cannot be a parent.
I have previously used uicontrol() with other uicontrol objects, as per http://www.mathworks.com/help/matlab/ref/uicontrol.html.
I don't want the user to have to click in the table before having to scroll through it.
Is there a possible workaround? This is on MATLAB R2015b.
Thank you!

채택된 답변

Walter Roberson
Walter Roberson 2015년 12월 18일
uitable() is not a uicontrol() so you cannot uicontrol() a uitable() . To set focus on the uitable() call uitable() on the handle.
The call you were making was being interpreted as asking uicontrol to create a new uicontrol whose parent was the uitable.
  댓글 수: 1
Won-Mean Lee
Won-Mean Lee 2015년 12월 18일
Doh, of course -- thank you!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 App Building에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by