The Color Picker below looks much like the pickers in other examples. However, two changes have been made:
Element ID strings for the Color Picker Control are stored in the YAHOO.widget.ColorPicker.prototype.ID
object. We've dumped the full output of that object to the logger to give you a sense of the object's full contents.
For the purposes of this example, we'll override the R
, G
, and B
members of that object. We'll create a new object with those members and then use YAHOO.lang.merge
to integrate our new values with the existing object; this will override only the members we specify in the second argument of the merge
function:
We can use the same technique to override members of YAHOO.widget.ColorPicker.prototype.TXT
for the purposes of customization or internationalization. Again, you can find the full contents of that object dumped to the logger console.
Here, we'll modify the R
, G
, and B
members and change those text strings to "Red", "Green", and "Blue":
Copyright © 2007 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Copyright Policy - Job Openings