Changing values in edit text using pop up menu?

I am new to MATLAB GUI, doing a Small project. In pop-up menu i'm going to give string as "Voltage" and "Current" and in Edit txt i'm setting the Limits of voltage and Current. if i'm clicking the "Voltage", that value should appear in Edit text. please help! Thank you.

Respuestas (1)

Walter Roberson
Walter Roberson el 27 de Jun. de 2018
function popup1_Callback(hObject, event, handles)
all_choices = get(hObject, String);
selected = get(hObject, Value);
chosen = all_choices{selected};
set(handles.text1, 'String', ['Enter ', chosen])

Etiquetas

Preguntada:

el 27 de Jun. de 2018

Respondida:

el 27 de Jun. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by