[CLOSED] Scroll a TabStrip using JavaScript

  1. #1

    [CLOSED] Scroll a TabStrip using JavaScript

    Hi,

    I want a (scrollable) TabStrip control to scroll to a specific tab item using JavaScript without activating the tab. Is this possible at all?

    <!DOCTYPE html>
    <html>
    <head>    
        <meta charset="utf-8" />
    </head>
    <body>
    
        @Html.X().ResourceManager()    
    
        @(Html.X().Panel()
            .Width(400)
            .TopBar(Html.X().Toolbar().Layout(LayoutType.Fit).Items(        
                Html.X().TabStrip().ID("MyTabStrip").Flex(1).Items(it => {
                    it.Add(Html.X().Tab().Text("looooooooong text 1"));
                    it.Add(Html.X().Tab().Text("looooooooong text 2"));
                    it.Add(Html.X().Tab().Text("looooooooong text 3"));
                    it.Add(Html.X().Tab().Text("looooooooong text 4"));
                    it.Add(Html.X().Tab().Text("looooooooong text 5"));
                    it.Add(Html.X().Tab().Text("looooooooong text 6"));
                    it.Add(Html.X().Tab().Text("looooooooong text 7"));
                })            
            ))
            .Items(Html.X().Button().Text("ScrollTo").OnClientClick("Ext.getCmp('MyTabStrip').scrollBy(56)"))
         )
            
    </body>
    </html>
    Last edited by Daniil; Jun 04, 2013 at 11:06 AM. Reason: [CLOSED]
  2. #2
    If TabStrip is scrollable then try this
    App.TabStrip1.layout.overflowHandler.scrollBy(100)
  3. #3
    Thank you, Vladimir.
    If you want to scroll to a specific tab, you can use

    App.FormTabStrip.layout.overflowHandler.scrollToItem(App.TabToScrollTo);
    Thread can be marked as closed.

Similar Threads

  1. Replies: 8
    Last Post: Jun 06, 2013, 12:42 PM
  2. [CLOSED] MVC 3 [Razor] and Ext.Net Tabstrip
    By dheeraj_us in forum 2.x Legacy Premium Help
    Replies: 15
    Last Post: Sep 14, 2012, 5:30 PM
  3. [CLOSED] creating tabStrip in javascript
    By supera in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: May 10, 2012, 5:58 PM
  4. Replies: 6
    Last Post: Oct 13, 2011, 11:55 AM
  5. I can not find the tabstrip why?
    By Fabrizio in forum 1.x Help
    Replies: 3
    Last Post: Jun 15, 2010, 2:49 PM

Tags for this Thread

Posting Permissions