Jump to content

Howto use "%" in statuspanel's widh?


Freeman35

Recommended Posts

19 hours ago, Freeman35 said:

How to use percentage value in statuspanel's widh?

One of the possible solutions I think.

function resize(sender, width, height, oldWidth, oldHeight, eOpts)
{
    Ext.defer(function() {
      
      var me=sender.items, 
      dV=0;
      
      //first panel 50%
      dV+=50*width/100;
      me.getAt(0).el.setStyle("width", dV+"px");
    
      //second panel 30%
      me.getAt(1).el.setStyle("left", dV+2+"px");
      dV+=30*width/100;
      me.getAt(1).el.setStyle("width", dV+"px");
                                                  
      //last 20%
      me.getAt(2).el.setStyle("left", dV+2+"px");
      dV+=20*width/100;
      me.getAt(2).el.setStyle("width", dV+"px");
      
    }, 20);
}

 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...