- scroll(uit,vlocation) where vlocation is 'top'|'bottom'
- scroll(uit,hlocation) where hlocation is 'left'|'right'
- scroll(uit,target,targetIndex) where target is 'row'|'column'|'cell' and targetIndex is a row or column number or a 1x2 cell location.
scroll programmatically within uitable
33 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
采纳的回答
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
Examples: uit is the uitable handle.
0 个评论
更多回答(1 个)
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
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!