uicontrol(tableHandle)

10 ビュー (過去 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 Center および File ExchangeApp Building についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by