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 commentaire

lirics lirics
lirics lirics le 8 Sep 2015
how to generatevalues in a popup menu using code wise

Connectez-vous pour commenter.

Réponses (1)

Walter Roberson
Walter Roberson le 8 Sep 2015
N = 10;
vals_to_set = cellstr( num2str((1:N).') );
set(handles.AnAppropriateHandle, 'string', vals_to_set);

2 commentaires

lirics lirics
lirics lirics le 8 Sep 2015
this code gave tocall back or create function
Walter Roberson
Walter Roberson le 8 Sep 2015
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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Interactive Control and Callbacks dans Centre d'aide et File Exchange

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

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

Start Hunting!

Translated by