EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
March 29, 2024, 02:42:48 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
Programatically resize two connected panels
Pages: [
1
]
« previous
next »
Print
Author
Topic: Programatically resize two connected panels (Read 6121 times)
peter
Newbie
Posts: 10
Programatically resize two connected panels
«
on:
January 10, 2017, 06:49:38 AM »
I have a layout panel, with two sub panels, one marked as "center", and one marked as "west".
There is a divider between them which can be moved with a mouse.
Is the a way of moving the divider programatically, and if so, how?
Logged
Pierre
Sr. Member
Posts: 439
Re: Programatically resize two connected panels
«
Reply #1 on:
January 10, 2017, 07:06:54 AM »
Hello
here is example:
Code:
var c = $('#your_layout_id'); // layout
var p = c.layout('panel','west'); // get the west panel
p.panel('resize', {width:your_new_width});
c.layout('resize'); // resize layout ...
«
Last Edit: January 10, 2017, 07:08:49 AM by Pierre
»
Logged
peter
Newbie
Posts: 10
Re: Programatically resize two connected panels
«
Reply #2 on:
January 10, 2017, 07:17:26 AM »
Thank you for the prompt reply
Logged
peter
Newbie
Posts: 10
Re: Programatically resize two connected panels
«
Reply #3 on:
January 15, 2017, 01:30:57 AM »
Hi.
The code you gave me nearly works - to within a few pixels.
If you run this sequence you will see that the left panel gets smaller with the resize.
xx = $('#mainLayout').layout('panel','west').width()
$('#mainLayout').layout('panel','west').panel('resize', {width:xx})
Peter
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...