[matlab2020b] how to get scroll position in panel object.
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I don't know how to get scroll cordination.
1. GUI screenshot and setting
- UIFigure size: 0,0,1400,488
- UITabGroup size: 0,0,1400,488
- UIPanel size: 15,192,1267,221 (but scrollable depend on data)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/862515/image.png)
I should put the blue button on the grid(it is uiimage). in the correct position.
2. Problem
when I scroll it, button is located in wrong position because the coordinate system has changed. Currently, the offset between the click coordinates of UIFigure and the position coordinates of UIImage is determined the position of the blue button. However, when scrolling occurs within the UIPanel, the UIFigure coordinates do not change. Therefore, the background (UIPanel) moves, but the click coordinates (UIFIGURE) continue to be the same and occur cordinate mismatch.
3. Solution
To solve this problem, I think we can continue to correct the offset by reflecting the scroll coordinates. But I can't figure out how much I scrolled in the matlab. So I ask a question. And this is just my idea, and if you have a better idea, please let me know.
0 Kommentare
Antworten (1)
Abhishek Chakram
am 19 Dez. 2023
Bearbeitet: Abhishek Chakram
am 19 Dez. 2023
Hi 상범 하,
It appears to me that you want to get the scroll position in a ”uipanel”. You can refer to the following MATLAB Answer for the same: https://www.mathworks.com/matlabcentral/answers/798802-acess-scroll-bar-location
Best Regards,
Abhishek Chakram
0 Kommentare
Siehe auch
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!