User guide |
(The code for this example can be found here: [ view | edit | run ] )
This example shows how the visible
property can be
used to hide whole sections of an interface.
fig =figure
( 'Name', 'Visible example', ... 'Position', [100 100 150 250], ... 'MenuBar', 'none', ... 'ToolBar', 'none', ... 'NumberTitle', 'off' ); panel =uiextras.BoxPanel
( 'Parent', fig, 'Title', 'Panel' );
box =uiextras.VButtonBox
( 'Parent', panel );uicontrol
( 'Parent', box, 'String', 'Button 1' );uicontrol
( 'Parent', box, 'String', 'Button 2' );uicontrol
( 'Parent', box, 'String', 'Button 3', 'Visible', 'off' );uicontrol
( 'Parent', box, 'String', 'Button 4' );uicontrol
( 'Parent', box, 'String', 'Button 5', 'Visible', 'off' );uicontrol
( 'Parent', box, 'String', 'Button 6' );
set( panel, 'Visible', 'off' );
set( panel, 'Visible', 'on' );
Enable example | [Top] | Using property defaults |