Dropdown in AppDesigner Callingback when Selecting the Same Value

7 ビュー (過去 30 日間)
Saivardhan
Saivardhan 2023 年 3 月 21 日
回答済み: Sachin 2023 年 3 月 21 日
I intend to create a drop down with several options, and with each option being selected corresponding to a pop-up window.
{option1, option2, option3}
triggers respectively
{tab1, tab2, tab3}
I find by using "DropDownValueChanged" function there is a problem that, if I selected option1 last time and then select option1 again, it can't trigger anything. This is reasonable since it got triggered only when value is changed. However, is there a way that I can repeatedly select option1 to trigger tab1? That is, is there a callback like "value selected/ option pushed" that responses to user everytime when the user selects an item, instead of only when item selected is changed?

採用された回答

Sachin
Sachin 2023 年 3 月 21 日
Hi
I understand that you want a callback function that responds to the user whenever the user selects an item in the dropdown.
Some workarounds that might be helpful to you:
  1. You can use the ‘ClickedFcn’ callback rather than ‘valueChangedFcn’. This callback responds user whenever the user selects an option from the drop-down.
  2. You can use a ‘listbox’ instead of a ‘dropdown’ menu. The Listbox have ‘ClickedFcn’ callback function that can help you to achieve the same feature that you want.
Refer to the following page for more information about listbox properties: https://www.mathworks.com/help/matlab/ref/matlab.ui.control.listbox-properties.html

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by