Results 1 to 2 of 2

Thread: BoxComponent Move or onPosition events during container scroll?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Oct 2007
    Posts
    585
    Vote Rating
    0
      0  

    Default BoxComponent Move or onPosition events during container scroll?

    I know about getting scroll event. I am wondering whether you can also get the component Move event due to scrolling? this way you can focus on a particular component and know when it repositioned during scrolling?

  2. #2
    Sencha User
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737
    Vote Rating
    93
      0  

    Default

    The Move event only happens (by default, of course you can fire it elsewhere) when any BoxComponent has setPosition called on it with something other than Style.DEFAULT for both arguments.

    You can however listen to the dom event Events.OnScroll to find out when a container has been scrolled, and update position accordingly. Without understanding your full use case it is hard to make suggestions, but it seems likely that you'd add a listener for OnScroll to every parent of the target component that could possibly scroll. Note that you might wish to use Event.Scroll instead if those parents are ScrollContainers or some other subclass of that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •