object. setTitleBar: Set the title Bar to be shown..
object. setTitleBarStyle: Set the Style for the Bar used as title for Bars and DFrame.
object. copyTitleBarToBottom : Copy the title at the bottom of the Bar or DFrame.
Example
DFrameAPI.preLoadImagesForButtonImage('CloseDFrame', path,_
'close.gif', 'closeOver.gif')
var barStyleForTitle = new BarStyle()
barStyleForTitle.setButtonImage('CloseDFrame', 'thisDFrame.closeFrame()')
var dFrameStyle = new DFrameStyle()
dFrameStyle.setTitleBarStyle(barStyleForTitle)
dFrameStyle.setTitleBar(true)
var dFrame = new DFrame(position, title. dFrameStyle)
Demo
file: addTaskBarAndMenu.html
object.setTitleBar(flag)
object.setDefaultTitleBarStyle(style)
object.copyTitleBarToBottom(flag)
style
A valid BarStyle:
flag
setTitleBar : If true the title appears on the top of the object.
copyTitleBarToBottom : If true the title Bar is copied to the bottom of the object
The first step to add a title Bar to an object is to set the titleBar value to true.
The title BarStyle has then to be defined: A title Bar is a Bar and needs its Style to work correctly. The default ButtonStyle properties will be used to define the title, but only for the 'Normal' state of Buttons: The Roll and, of course, Down, Selected and RollSelected states properties will not apply.
Eventually you can add Buttons or ButtonsImages with the setButton, setButtonImage and setButtons methods of the BarStyle.
At last you must add this default title BarStyle to the Style of the object which will have a title Bar, with the setDefaultTitleBarStyle method.