Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Tab panel with partially scrolling tab bar

  1. #11
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,331
    Answers
    3884
    Vote Rating
    1297
      0  

    Default

    Yes, you would have to detect scrolling and add the tab bar to the container if the tab panel is scrolled under the container and when the top of the tab panel is back in view add the tab bar back to the tab panel.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  2. #12
    Sencha User
    Join Date
    Mar 2012
    Posts
    47
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by mitchellsimoens View Post
    Yes, you would have to detect scrolling and add the tab bar to the container if the tab panel is scrolled under the container and when the top of the tab panel is back in view add the tab bar back to the tab panel.
    Thats great. I was thinking along similar lines, but I'm not sure how to accomplish this.

    Is there a function that I can use to "remove" the tabbar form the tabpanel or Container, and put it somewhere else? and then put it back when I need to?

    Also, won't this create a jerk in the scrolling motion?

  3. #13
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,331
    Answers
    3884
    Vote Rating
    1297
      0  

    Default

    Listen for the scroll events on the scroller to detect when you are scrolling.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #14
    Sencha User
    Join Date
    Mar 2012
    Posts
    47
    Vote Rating
    0
      0  

    Default

    I got that part. What I meant was, I don't know how to get the tabbar to stick or scroll in its default position under certain conditions - in this case - scroll value.

    Is there any function that can help me relocate the tabbar?

  5. #15
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,331
    Answers
    3884
    Vote Rating
    1297
      1  

    Default

    All you have to do is container.add(tabbar) and that will move the tabbar from the tab panel to the container.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  6. #16
    Sencha User
    Join Date
    Mar 2012
    Posts
    47
    Vote Rating
    0
      0  

    Default

    Great! Thanks a lot dude! I'll try this out and post my results here later.

    Cheers~!

  7. #17
    Sencha User
    Join Date
    Dec 2008
    Location
    Manchester, UK
    Posts
    115
    Answers
    4
    Vote Rating
    23
      0  

    Default

    Did you ever get this to work by changing the docking of the tab bar from the tab panel to the hosting container?

    I've also been trying to get something similar working, but have tried to do it by hiding the top panel when it moves off screen and swapping which container can scroll, but its all rather fiddly and the tab bar only docks to the top of the parent container after the touch has been removed.

    If you got this working, would it be possible for you to post how you moved the tab bar from one container to another?

    Thanks.

Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

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