⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test_listbox_callback.m

📁 图像分割算法的Matlab源程序
💻 M
字号:
function test_listbox_callback(action)

switch action
case 'button'
   Hndl = findobj(gcbf,'Tag','Listbox1');
   value = get (Hndl,'Value');
   Hndl = findobj(gcbf,'Tag','Label1');
   str = ['Option ' num2str(value)];
   set (Hndl,'String',str);

case 'list'
   % If this was a double click, update the label.
   selectiontype = get(gcf,'SelectionType'); 
   if selectiontype(1) == 'o'
      Hndl = findobj(gcbf,'Tag','Listbox1');
      value = get (Hndl,'Value');
      Hndl = findobj(gcbf,'Tag','Label1');
      str = ['Option ' num2str(value)];
      set (Hndl,'String',str);
   end
end

⌨️ 快捷键说明

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