Question
in enyo I can't find any documentation that tells tyou how to chnage the Properties. For example in the documentation it has disabled as one of the properties. What would the java script code be to set that property, so I could make the button go on and off?
Solution
Let's say you have something like:
/* Enyo controls code */
{name: "detailButton", disabled:true, caption: "Details"},
/* More Enyo code */
To change that property, just use Enyo's property system:
myFunction: function() {
this.$.detailButton.setDisabled(false);
}
You can define your own properties using:
published:{
myProperty: ""
}
You will then have a setMyProperty() function and a myPropertyChanged() to observe changes in your property
OTHER TIPS
I take an example of a text area of enyo, whose property u want to set.. consider we declared something like this:
{kind: "enyo.TextArea", name: "keymouse", placeholder: "Mouse events.", style : "width:150px ;height:400px ; position: fixed; top : 30px; left:650px"}
To change the contents of the text area you can do something like this:
this.$.keymouse.setValue("Mousedrag"+ " ");
So, all you need to do is call set*propertyname* for your particular element..
And also incase u also want to change or add some stylings then do something like this:
this.$.<element_name>.applyStyle("background-color", "red");