ButtonStyle : copyStyle

A Button can have 6 states: Normal, Roll, Down, Selected, RollSelected and Inactive. See description of Button's events for more information.

The parameters of a state can be copied to another state with the copyStyleMethod.

Example

buttonStyle.setTextNormal ('#AFCDEF')

buttonStyle.setBgNormal (contentBlueBgCol)

buttonStyle.setBosNormal (false)

buttonStyle.setIosNormal (false)

buttonStyle.setBordersNormal (true)

buttonStyle.setImageNormal(basePathForIcons+'tabNormal.gif')

 

buttonStyle.copyStyle('Normal', 'Roll')

buttonStyle.setTextRoll ('#fffff')

buttonStyle.setBgRoll ('#000084')

 

buttonStyle.copyStyle('Roll', 'Down')

 

buttonStyle.copyStyle('Roll', 'Selected')

buttonStyle.setImageSelected(basePathForIcons+'tabSelected.gif')

 

buttonStyle.copyStyle('Roll', 'RollSelected')

 

buttonStyle.copyStyle('Normal', 'Inactive')

buttonStyle.setTextInactive('#ffffff')

buttonStyle.setImageInactive(basePathForIcons + 'trame.gif')

Syntaxes

ButtonStyle.copyStyle(fromStyle, toStyle)

Parameters

fromString

String (not case sensitive). The name of the source set of properties. Can be 'NORMAL', 'ROLL', 'DOWN', 'SELECTED', ROLLSELECTED', and 'INACTIVE'.

toString

String (not case sensitive). The name of the target set of properties. Can be 'NORMAL', 'ROLL', 'DOWN', 'SELECTED', ROLLSELECTED', and 'INACTIVE'.