Dynamic Panel

Dynamic Panel is a Matlab class which allows you to have panels which are hidden at run time and appear when you place the mouse near them (hold mouse stationary for a given time).

The dynamicPanel class is an integrated option in matpigui class (& mguide) or it can be used as a standalone feature.  A simple example is shown below:

Example - Using dynamicPanel (see bottom of page for code)

When the figure is first created the dynamic panel is hidden:


When the mouse is placed near the right hand side (default - it can be any location) and held for a set period of time (default is 2 seconds, can be customised) then the dynamic panel will start to appear:


The dynamic mode of it appearance (time and frame rate) can be customised. 
Once it is finished it looks like this:


By default a pin is added to fix the panel in position.  If the pin is not set then the panel will stay in visible until the mouse is stationary over the primary GUI (e.g. the axes above).

If the user clicks on the pin:


the panel will stay in position until its unpinned and the mouse moved away as before.

% create a figure

d = figure;

% place a uipanel on a figure

uip = uipanel ( 'parent', d, 'position', [0 0 1 1] );

% for visualisation place a axes on the primary panel:

axes ( 'parent', uip );

% Create a dynamic Panel - attached to uipanel which when shown will have

% a width of 0.15 (normalised by default)

dPanel = dynamicPanel ( uip, 0.15 );

% You can add controls to the dynamic panel:

uicontrol ( 'parent', dPanel.dynPanel, 'style', 'pushbutton', 'units', ...

'normalized', 'position', [0.1 0.1 0.8 0.2], 'string', 'My Button' )