scroll programmatically within uitable

55 ビュー (過去 30 日間)
Steven Brossi
Steven Brossi 2020 年 8 月 10 日
編集済み: Adam Danz 2021 年 5 月 10 日
I am starting to build an app suing the AppDesigner and need to deal with a fairly large uitable (>1000 rows).
In some cases it would be nice to scroll within this table to a certain row or cell programmatically.
https://ch.mathworks.com/help/matlab/ref/matlab.ui.container.tree.scroll.html shows that in 2020a there is now the function scroll, which allows scrolling e.g. within a list box to a certain item.
Is there a way to do the same within a uitable (created using the AppDesigner)? If not, if there a plan to add this in the near future?

採用された回答

Adam Danz
Adam Danz 2020 年 8 月 10 日
編集済み: Adam Danz 2021 年 5 月 10 日
A function (findjobj) on the file exchange supports programmatic scrolling on uitables when the uitable is embedded in a regular figure (demo here).
However, this method is not supported in uifigures (used by AppDesigner) for reasons explained in this answer.
Update! Matlab R2021a now supports programmatic scrolling in UITables
You can programmatically scroll to any row, column, or cell of a uitable using the scroll function.
Examples: uit is the uitable handle.

その他の回答 (1 件)

Sean de Wolski
Sean de Wolski 2020 年 8 月 10 日
The scroll syntax in 20a only works in uifigures (the underlying figure used by app designer). Simply call it in a callback or function in the app.
  4 件のコメント
Adam Danz
Adam Danz 2020 年 8 月 10 日
Looking forward to the "yet" part. Lots of people have asked how to programmatically scroll to a certain row and column of a uitable.
Steven Brossi
Steven Brossi 2020 年 8 月 11 日
Thank you for all the feedback. Now I'm sure I didn't miss something and it's really not (yet) supported.
For me it's just a nice-to-have feature, so no drama. Of course, once scrolling within UITable is supported, I'll happily add it to my app.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by