Set list box

7 Ansichten (letzte 30 Tage)
john
john am 1 Mär. 2012
Hi,
I have number 5. How can I set up items of the listbox or popupmenu like this:
1
2
3
4
5
? Thanks

Akzeptierte Antwort

Sean de Wolski
Sean de Wolski am 1 Mär. 2012
n = 5;
uicontrol('style','list','string',num2cell((1:n).'))
  1 Kommentar
john
john am 1 Mär. 2012
1. from listbox can I get the value? x=get(handles.listbox,'Value');
if (x == 1)........?
2. and how can I set number 5 to popupmenu?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by