Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7186287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:36:00+00:00 2026-05-28T18:36:00+00:00

I defined two panels in viewport: a main panel which is non-floating, the other

  • 0

I defined two panels in viewport: a main panel which is non-floating, the other one is a floating panel with a slider in its bottom toolbar. When mouse clicks at the body of the main panel, it generates a random value which is used to set the new value of the slider bar; it works well when the floating window is not collapsed..

the problem I have now is when the slider container (floating panel) is collapsed, each time after mouse clicks at the main panel (to set the slider’s value), if user expands the floating window, you will see that the slider pointer goes back to the beginning; I assume this is not right, I want slider’s value changed as well even when its container collapses.

I am wondering whether I missed any configs in the slider….. wish somebody can advise me! thanks!

I attach a copy&run script here:

    <!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
    <script type="text/javascript" src="http://extjs.cachefly.net/ext-3.2.1/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="http://extjs.cachefly.net/ext-3.2.1/ext-all.js"></script>
    <link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-3.2.1/resources/css/ext-all.css" />
</head>
<script type="text/javascript">
Ext.BLANK_IMAGE_URL = 'img/s.gif';

Ext.onReady(function() {
    Ext.QuickTips.init();   

    var mainPanel = new Ext.Panel({ //define a main non-floating panel
            title: 'main',
            id: 'mainPanel',
            width: 400,
            height: 400

        });

    //define viewport
    var viewPort = new Ext.Viewport({ 
        items: [
            mainPanel
        ]
    });

    mainPanel.body.on('click', function() {
        var tmpValue = parseInt(Math.random() * 90) + 10; //generate a random value, also make sure it's always larger than 0
        Ext.getCmp('testSlider').setValue(tmpValue); //set new value for the test slider
    });

    var floatWin = new Ext.Window({ //floating panel, the container of a slider bar
        id:'floatWin',
        title: 'Float Win',
        closable: false,
        width: 200,
        height: 200,
        layout: 'fit',
        floating : true,
        collapsible: true,
        bbar:[{
            xtype: 'slider', //test slider
            minValue: 0,
            maxValue: 100,
            id: 'testSlider',
            width: 80,
            increment: 1,
            stateful: true
        }]
    });

    floatWin.show();
}); 
</script>
<body>
</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T18:36:01+00:00Added an answer on May 28, 2026 at 6:36 pm

    You can fix this issue by simply calling Ext.Slider.syncThumb method inside expand listener attached on your floating panel. You can check out working jsFiddle here based on your code.

    <!DOCTYPE HTML>
    <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
        <script type="text/javascript" src="http://extjs.cachefly.net/ext-3.2.1/adapter/ext/ext-base.js"></script>
        <script type="text/javascript" src="http://extjs.cachefly.net/ext-3.2.1/ext-all.js"></script>
        <link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-3.2.1/resources/css/ext-all.css" />
    </head>
    <script type="text/javascript">
    Ext.BLANK_IMAGE_URL = 'img/s.gif';
    
    Ext.onReady(function() {
        Ext.QuickTips.init();   
    
        var mainPanel = new Ext.Panel({ //define a main non-floating panel
                title: 'main',
                id: 'mainPanel',
                width: 400,
                height: 400
    
            });
    
        //define viewport
        var viewPort = new Ext.Viewport({ 
            items: [
                mainPanel
            ]
        });
    
        mainPanel.body.on('click', function() {
            var tmpValue = parseInt(Math.random() * 90) + 10; //generate a random value, also make sure it's always larger than 0
            Ext.getCmp('testSlider').setValue(tmpValue); //set new value for the test slider
        });
    
        var floatWin = new Ext.Window({ //floating panel, the container of a slider bar
            id:'floatWin',
            title: 'Float Win',
            closable: false,
            width: 200,
            height: 200,
            layout: 'fit',
            floating : true,
            collapsible: true,
            bbar:[{
                xtype: 'slider', //test slider
                minValue: 0,
                maxValue: 100,
                id: 'testSlider',
                width: 80,
                increment: 1,
                stateful: true
            }],
            listeners: {
                expand: function() {
                    Ext.getCmp('testSlider').syncThumb();
                }
            }
        });
    
        floatWin.show();
    }); 
    </script>
    <body>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have defined two models where each one references the other, like so: class
Preface: I have two entities defined as a one-to-many relationship: A <<-------> B. B's
I'm having some problems displaying the contents of one NSArrayController in two windows defined
In one file, I am creating a tab panel with two tabs. I am
I defined two classes. First one... [Serializable] public class LocalizationEntry { public LocalizationEntry() {
I have a function called DrawPlaybook which listens to two events, one mouseclick event
Inside a DLL, we've defined two classes (Class1 and Class2) which inherit from an
I have defined two endpoints in my App.Config file as <system.serviceModel> <services> <service name=HostDirectAddress.ITestService
I'm using silverlight and I defined two styles for the page: ExpanderBottomRightButtonStyle ExpanderScaleStyle Now
An IP Subnet is defined with two parts, a network and a prefix-length or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.