Controlling the scroll position of a uitable
古いコメントを表示
Hello
I had a uitable which I decided to split in two, because of its size. Therefore, I want to synchronize the vertial scroll position of both tables, that is, if I scroll down on one table, the other should scroll down by the same amount.
Breaking it down, what I need to do is (for each table): 1) Trigger a callback when the vertical scroll position is changed. 2) Read the current scroll position 3) Set the scroll posiiton of the second table.
However, I can't figure out how to do this, either through native MAtlab or through the Java handle.
回答 (2 件)
Walter Roberson
2012 年 12 月 21 日
2 投票
Unfortunately this is not possible, unless it can be done through Java.
The closest you can get to this is to place an object on its own uipanel(); then by changing the Position of the object you can move it around relative to the frame that is the uipanel border. By using linkprop() you can make the Position of the two uitable (each in their own uipanel) the same. You can add a scrollbar outside of either of the two uipanel that you can use to choose the Position.
This is certainly not as nice as using the scrollbars that uipanel automatically provides, but unfortunately there is no documented way to find out what part of the uipanel is currently visible when you use the built-in scrolling.
カテゴリ
ヘルプ センター および File Exchange で Construct and Work with Object Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!