Scroll to location within uidropdown

4 ビュー (過去 30 日間)
David K
David K 2023 年 5 月 15 日
回答済み: Adam Danz 2023 年 5 月 15 日
I have a uidropdown with a very long list of options. I would like to set it so that when a user clicks on the dropdown it automatically jumps to the currently selected value, rather than starting at the top and having to scroll every time. I have successfully done this with a uilistbox using the scroll command, but Dropdowns are not supported by that function. Is there a way to set the scroll position for Dropdowns?

回答 (1 件)

Adam Danz
Adam Danz 2023 年 5 月 15 日
Currently there isn't a way to programmatically scroll within a DropDown list.
Two workarounds could be to use a uilistbox or to use the ValueChanged function of the DropDown to put the selected item on the top of the list until another item is selected.

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by