7 Replies Latest reply on Jul 2, 2008 2:28 PM by ericbelair

    Creating Components in non-visible Containers of ViewStack

    ericbelair Level 1
      Here's my problem.

      I have a ViewStack that is controlled by a TabBar, with the first child selected by default. The ViewStack is dynamic and can have nay number of children, which are each a Canvas component. Each child container makes calls to WebServices in order to retrieve the data displayed in it. I call each WebService in each child in the background, while the user is viewing the first child. While each WebService is running, I display a ProgressBar component on top of the Canvas, centered over the Canvas.

      Now, in the first (visible) child, the ProgressBar displays in its correct position. However, in the other ViewStack children, the WebServices get called, and the ProgressBar displays, but it is tucked way up in the left hand corner of the Canvas, only partially visible.

      I think this has something to do with the parent components not being measured until the ViewStack child Canvas is made visible, but I can't find a workaround.

      Can anyone help?

      I've attached the code for my custom ProgressBar component (I've removed unnecessary code - i.e. styles).

      Thanks.