title: Smooth transition (optical effect) between uitabpanels in Matlab
body: <p>I have designed a group of three uitabpanels objects. </p>
  
  <pre><code>  htab = uitabgroup('v0');
    th1 = uitab('v0',htab,'title','Panel 1','ButtonDownFcn',...
        @th1_ButtonDownFcn);
    th2 = uitab('v0',htab,'title','Panel 2','ButtonDownFcn',...
        @th2_ButtonDownFcn);
    th3 = uitab('v0',htab,'title','Panel 3','ButtonDownFcn',...
        @th3_ButtonDownFcn);
  </code></pre>
  
  <p>My intention is having a smooth transition between them when I change the selected uipanel through the mouse click. I pretend to achieve it changing the 'Visible' property of the elements contained inside them using the ButtonDownFcn function ( I got this idea based on  the description section of <a href="http://bit.ly/kAxsHc" rel="nofollow">this page</a>).</p>
  
  <pre><code>    set(handles.th2,'Visible','off');
      set(handles.th3,'Visible','off');
  ...
    function th1_ButtonDownFcn(hObject, eventdata)
    handles = guidata(fh);
    set(handles.th1,'Visible','on');
    set(handles.th2,'Visible','off');
    set(handles.th3,'Visible','off'); 
    guidata(fh,handles);
    end
  
    function th2_ButtonDownFcn(hObject, eventdata)
    handles = guidata(fh);
    set(handles.th1,'Visible','off');
    set(handles.th2,'Visible','on'); 
    set(handles.th3,'Visible','off');
    guidata(fh,handles);
    end
  
    function th3_ButtonDownFcn(hObject, eventdata)
    handles = guidata(fh);
    set(handles.th1,'Visible','off');
    set(handles.th2,'Visible','off');
    set(handles.th3,'Visible','on');
    guidata(fh,handles);      
    end
  </code></pre>
  
  <p>where </p>
  
  <p>fh: handle of the figure where they are contained the uitabpanels.</p>
  
  <p>handles.th1, handles.th2, handles.th3: handles of the elements contained into each uitabpanel respectively.</p>
  
  <p>However, it has not worked (I click on each one of uitabpanel's tabs and the visibility of them do not change) and I do not understand why. </p>