test_popup_callback.m

来自「基本的matlab编程源代码」· M 代码 · 共 10 行

M
10
字号
function test_popup_callback

% Find the value of the popup menu
value = get(gcbo,'Value');

% Place the value into the text field
Hndl = findobj(gcbf,'Tag','Label1');
str = ['Option ' num2str(value)];
set (Hndl,'String',str);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?