Setting the Choice in a popup-menu

3 ビュー (過去 30 日間)
Matthias Freitag
Matthias Freitag 2017 年 10 月 24 日
コメント済み: Matthias Freitag 2017 年 10 月 24 日
I want to use a popup menu to let the user choose some options. However, I want to adjust the choice set by default. It should not always be the first available option. What is the code for setting the choice of a popupmenu by code, so without user input. To make it clear: I don't want to change the options themselves, I just want to select options by code. It also would be great if the callback function was not called, every time I change that choice by code.
Thanks in advance!

採用された回答

Rik
Rik 2017 年 10 月 24 日
Just use the set function:
set(DropdownObject,'Value',3)
%set the dropdown selection to the third option without running the callback function
  1 件のコメント
Matthias Freitag
Matthias Freitag 2017 年 10 月 24 日
thanks, that was what I was looking for :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeApp Building についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by