position.menu.html

<HTML>

<HEAD>

<script>var dFrameFilePath = '../../../../../dFrame/'</script>

<script language="Javascript" src="../../../../../dFrame/dFrame/lib/DFrameAPI.js"></script>

<script language="Javascript">

//Global

var baseAll

//Style

DFrameAPI.include('dFrame/styles/colors/styleColors.js')

DFrameAPI.onLoad = function(){

var dFrame = new DFrame(['*', '*', 90, 90], 'position.button.html', dFrameStyle, baseAll)

var bar = dFrame.addBar([10, 10, 90, 90])

//If not values of included style ('BUTTON' => content for a floating Bar) will resize Bar

bar.setAutoWidth('')

bar.setAutoHeight('')

//Define arrays for a Menu

subMenuDef = new Array()

subMenuDef[0] = new Array('Button', 'New', 'alert("Click !")')

subMenuDef[1] = new Array('Button', 'Open', 'alert("Click !")')

var M = new Array()

M[0] = new Array('Button', 'Documents', subMenuDef)

M[1] = new Array('Button', 'Exit', 'thisDFrame.closeFrame()')

//Menu is added to bar: Modify the default Button Style of the default MenuStyle of bar

bar.getStyle().getDefaultMenuStyle().getDefaultButtonStyle().setActivateOn('OVER')

bar.addMenu(M, 'Menu dims: [10, 10]', [10, 10])

bar.addMenu(M, 'Menu dims: [\'*\', 10]', ['*', 10])

bar.addMenu(M, 'No dims for Menu', '')

bar.addMenu(M, 'Menu dims: [\'*\', \'*\']', ['*', '*'])

bar.addMenu(M, 'Menu dims: [80, \'*\']', [80, '*'])

dFrame.show()

}

</script>

</HEAD>

</HTML>