Hello all !!
I am actually trying to create a GUI where i need to display certain values in static box for each chose value in pop up menu .
For example : When chosen 1 should display 1000 in static box and so on ,
i have written the following code in the call back of pop up menu with tag name popupmenu1 and staticbox with tag name text2 , the programs works fine but is not displaying the assigned values to static box !
Where am i going wrong ? Any sort of help is appreciated.
function popupmenu1_Callback(hObject, eventdata, handles)a= get(handles.popupmenu1,'value');if a==1set(handles.text2,'value',1000);endif a==2 set(handles.text2,'value',1200);endif a==3 set(handles.text2,'value',3000);endif a==4 set(handles.text2,'value',4000);end
Best Answer