dynapi.gui.panelbar - Quick Reference

Inherit: DynLayer

Constructor

PanelBar(menulayer,contentlayer,menuheight,x,y,w,h,menuclass,contentclass,minimized)
menulayer - must be a layer
contentlayer - must be a layer
menuheight - number of pixels the menu should be (when minimized it will scrink to this value)
menuclass / contentclass - these are the css name
minimized - can be set to true/false, if true the PanelBaris created as a minimized PanelBar

The menulayer should contain text or html and if the PanelBar should be able to minimize by the user (either by clicking on the images or the text) there should be {@min} somewhere in the html witch is replaced by the PanelBar to support minimizable functionallity.

Events

 
...

Public Methods

minimize()
...
maximize()
...
setClipImage(clipImage, cols, rows)
...
setMinMaxImg(imgmin,imgmax)
imgmin and imgmax should be dynimages
...

Private Methods

...

Static Methods

[none]

Example:

f=dynapi.functions;
var imgmin=f.getImage('images/win_min.gif',15,16);
var imgmax=f.getImage('images/win_max.gif',15,16);

var lyrMenu = new DynLayer('',null,null,null,null,'#30557A');
lyrMenu.setHTML('<table width=100% border=0 ceppadding=0 cellspacing=0><tr><td>My Menu</td><td align=right>{@min}</td></tr></table>')
var lyrContent = new DynLayer('This PanelBar and the two under are in the stacker, the stacker reacts on sizechanges and moves the layers when the size changes.',null,null,null,null,'#326597');
var lyrPanelBar = new PanelBar(lyrMenu,lyrContent,20,50,50,200,100,'cssmenu','csscontent',false);
lyrPanelBar .setMinMaxImg(imgmin,imgmax);

dynapi.document.addChild(lyrPanelBar );