Set list box

7 次查看(过去 30 天)
john
john 2012-3-1
Hi,
I have number 5. How can I set up items of the listbox or popupmenu like this:
1
2
3
4
5
? Thanks

采纳的回答

Sean de Wolski
Sean de Wolski 2012-3-1
n = 5;
uicontrol('style','list','string',num2cell((1:n).'))
  1 个评论
john
john 2012-3-1
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?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by