EasyUI Forum
September 14, 2025, 02:25:23 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Panel Resize  (Read 16960 times)
evaj
Newbie
*
Posts: 13


View Profile Email
« on: September 27, 2012, 12:26:25 AM »

Hello,
Ì'm trying to resize a panel, and the body is resizable but the header no, Could you help me please?

This is my code:

           var p = $("<div id=\"p\" style=\"padding:10px;background:#fafafa;\" data-options=\"closable:true,collapsible:true,maximizable:true,doSize:false\"></div>").appendTo('#ccc');
            $('#p').resizable();

            p.panel({
                title:Oper,
                //height:100,
                closable:true,
                collapsible:true,
            });

Thanks
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: September 27, 2012, 02:17:09 AM »

The resizable feature is not supported in panel plugin. But you can wrap a resizable <div> around the panel. Set 'fit' property of panel to true and call 'resize' method when the wrap <div> is resizing.

Code:
<div id="ccc" style="width:400px;height:300px;padding:5px">
  <div id="0" class="easyui-panel" data-options="fit:true,closable:true,collapsible:true,maximizable:true"/>
</div>
Code:
$(function(){
$('#ccc').resizable({
edge:5,
onResize:function(){
$('#p').panel('resize');
},
onStopResize:function(){
$('#p').panel('resize');
}
});
});
« Last Edit: September 27, 2012, 02:18:58 AM by stworthy » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!