How to programmatically scroll to a row of a uitable in appdesigner?

7 Ansichten (letzte 30 Tage)
Peter Valent
Peter Valent am 25 Jun. 2019
Beantwortet: Kanishk am 12 Feb. 2025 um 5:24
Hi I have created a small app in appdesigner. It contains a uitable component which holds many rows of data. The app enables to set a value find in a specific column and after pressing a push button it should scroll to the row with this value. I know the position of the row but I dont know how to scroll to the row.
How can I do it?

Antworten (1)

Kanishk
Kanishk am 12 Feb. 2025 um 5:24
You can programmatically scroll to a specific row in a UITable component within a MATLAB app, you can use the scroll function. This function allows you to specify the row number you want to bring into view. Below is a simple example demonstrating how to use the scroll function with a UITable:
uit = uitable(fig,"Data",randi(100,100,3));
scroll(uit, "row", 25)
You can learn more about "scroll" function from this official MATLAB documentation.

Kategorien

Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange

Produkte


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by