Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    What's the life cycle for smartClient?

    For most of the SmartClient canvas, we can only set properties when creating them.
    But some times, I need to catch the timing point such as "set header height" after an window created.
    As I know only initWidget but still happends before rendered.
    Can any guys provide me for it?

    #2
    Sounds like you're looking for a way to set properties after a component has been created, when it is actually being written into the DOM? If so you can simply override 'draw()' to call your custom logic and then use this.Super("draw", arguments) to perform the default behavior (actually write the component's HTML out).

    Something along these lines:
    Code:
    isc.Canvas.create({
      ID:"testCanvas",
      autoDraw:false,
      backgroundColor:"lightblue",
      draw : function () {
         this.setContents("Rendered at timestamp::" + new Date().getTime());
      }
    });
    There are a number of other event handlers too. Check the documentation for these

    Comment

    Working...
    X