To do this, we use the validateNow() method of the component. According to LiveDocs,
“validateNow- Validates and updates the properties and layout of this object by immediately calling validateProperties(), validateSize(), and validateDisplayList(), if necessary.”
Also,
“validateNow()-Validate and update the properties and layout of this object and redraw it, if necessary. Processing properties that require substantial computation are normally not processed until the script finishes executing. For example setting the width property is delayed, because it may require recalculating the widths of the objects children or its parent. Delaying the processing prevents it from being repeated multiple times if the script sets the width property more than once. This method lets you manually override this behavior”
However, since validateNow() forces validation in the same frame it may be processor intensive. So try and not use it unless it is absolutely necessary.
Thanks,
Shaleen Jain
You write very well.
ReplyDeleteyaar ! yeh color combinition kya hai ? kuch change karo yaar ! mera toh sar chakragaya yahan land karke
ReplyDelete@Anonymous...thanks for your feedback.Hope you are good now...
ReplyDelete