BackgroundColor (Function)

BackgroundColor gets or sets the background color style of an element. Providing a parameter will set the background color and return the calling element so that you can chain functions. Not providing a parameter will return the background color as a hexadecimal value in the format #rrggbb.

Functions

BackgroundColor() : String – Returns the background color of the element, if set, as a string. If the background color is inherited from a parent element, the background color returned is a  blank string.

BackgroundColor(String color) : Element – Sets the background color of the element to the provided string. This can be any color reference (“blue”, “green”, red”, “navy”, etc) or a hexadecimal formatted color (“#DDBC98”, “#2C7821”, etc). Setting the background color to a blank string will remove the background color and allow the element to inherit the parent’s background color.

BackgroundColor(Colors value) : Element – Sets the background color of the element to the provided Colors enumeration.

Last edited Jan 5, 2011 at 2:27 PM by dahrkdaiz, version 1

Comments

No comments yet.