MATLAB: Do the UIControls inside the UIPanels flicker when the GUI first opens in MATLAB 7.7 (R2008b)

MATLAB

My GUIDE-designed GUI contains UIPanels containing UIControls. The UIPanels are set with the visibility property to 'off', but the UIControls have their visibility property set to 'on'.
When I initially start my GUI, the UIControls inside the UIPanels are briefly visible, resulting in a flicker when the GUI first appears.

Best Answer

When the UIControls are first created, their visibility property is read and they are created using that property regardless of the state of the UIPanel that contains them.
As a workaround, set the visibility property of the UIControls to 'off' when designing the GUI in GUIDE. Then, in the opening function of the GUI, add logic that will turn the visibility property to 'on'. For example:
h_on = findobj(handles.uipanel1,'Style','UIcontrol');
set(h_on,'Visible','on')