


Pulls the clicked object to the top of the ui stack; useful for raising partially masked objects to the front of a plot. GUI-shortcut for 'uistack': Left-clicking brings to the top, right-clicking sends to bottom.


0001 function raise_me (hObject, event, me) 0002 % Pulls the clicked object to the top of the ui stack; useful 0003 % for raising partially masked objects to the front of a plot. 0004 % GUI-shortcut for 'uistack': Left-clicking brings to the top, 0005 % right-clicking sends to bottom. 0006 0007 myfig = gcf; 0008 oldptr = get(myfig, 'Pointer'); 0009 set(myfig, 'Pointer', 'watch'); 0010 0011 switch(get(myfig, 'SelectionType')), 0012 case ('normal'), 0013 uistack(me, 'top'); 0014 case ('alt'), 0015 uistack(me, 'bottom'); 0016 end 0017 0018 set(myfig, 'Pointer', oldptr); 0019 drawnow;