PushPanel Object

PushPanel is a simple scrolling mechanism for the ScrollWindow object.

Constructor

It has the same constructor as the ScrollWindow

PushPanel(x,y,width,height,frame)

The PushPanel scroll arrows to the ScrollWindow. They appear and disappear whether they are need or not. There's on and off states to each of the buttons, and there's vertical and horizontal images, making a total of 8. For simplicity you must name these images:

The images used in my demo are in the DynAPI images directory. The width of these images must be the same as the width of the ScrollWindow, and their height must be sent to the setImages() method along with the directory they are located:

mypanel = new PushPanel(50,100,150,150)
mypane.setImages(16,'../images/')

Then do the standard build(), writeCSS(), write(div), and activate(), and everything should display correctly. It also supports the divStart and divEnd properties for inline content.

The ScrollWindow is a .window property, so to load a file into the scroll you'd do:

mypanel.window.load('mypage.html')

In the external file, the BODY onLoad should call parent.yourpushpanel.activate()

Horizontal PushPanel

To convert the PushPanel to scroll horizontally, set isVertical to false before you build():

...
mypanel.isVertical = false
mypanel.build()

The images used in my example are in the DynAPI images

And that's all folks, no other properties or methods are necessary for operation. You'll notice in the source to the PushPanel there is up/down/stop methods, but these are automatically handled for you.

Example: pushpanel1.html [source]

Source Code

pushpanel.js

Home Next Lesson: Tabs Object
copyright 1998 Dan Steinman