sir popup menu can gave certain value

sir popup menu can gave certain value.its automatically increment.....i used to generate 1,2 ,3 up to 10

1 Comment

how to generatevalues in a popup menu using code wise

Sign in to comment.

Answers (1)

N = 10;
vals_to_set = cellstr( num2str((1:N).') );
set(handles.AnAppropriateHandle, 'string', vals_to_set);

2 Comments

this code gave tocall back or create function
You can use this code any time before the user needs to see the menu.
Do not put it in the create function because your maximum value is variable and the create function will not know what the maximum value is yet. Put it in the callback of whatever routine calculates determines the maximum value to use.

Sign in to comment.

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Tags

No tags entered yet.

Asked:

on 8 Sep 2015

Commented:

on 8 Sep 2015

Community Treasure Hunt

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

Start Hunting!