Home > vbmeg > functions > gui > get_child_handle.m

get_child_handle

PURPOSE ^

---

SYNOPSIS ^

function h = get_child_handle(h_fig,key)

DESCRIPTION ^

 ---
 function h = get_child_handle(h_fig,key)

 Get the handle of a child of the figure specified by h_gif. The
 child is identified by a key, which is stored in 'UserData'
 property of the child when creating GUI on the figure. 
 
 2005-03-23 Taku Yoshioka
 ---

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function h = get_child_handle(h_fig,key)
0002 % ---
0003 % function h = get_child_handle(h_fig,key)
0004 %
0005 % Get the handle of a child of the figure specified by h_gif. The
0006 % child is identified by a key, which is stored in 'UserData'
0007 % property of the child when creating GUI on the figure.
0008 %
0009 % 2005-03-23 Taku Yoshioka
0010 % ---
0011 %
0012 % Copyright (C) 2011, ATR All Rights Reserved.
0013 % License : New BSD License(see VBMEG_LICENSE.txt)
0014 
0015 h_all = get(h_fig,'Children');
0016 
0017 for i=1:length(h_all)
0018   if strcmp(get(h_all(i),'Tag'),key), 
0019     h = h_all(i); 
0020     return;
0021   end
0022 end
0023 
0024 error(['Children ''' key ''' was not found.\n']);
0025

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005