-
14 Oct 2006 1:30 PM #1
splitter and onDblClick
splitter and onDblClick
Hello,
Does anybody know how to make the splitter (horizontal or vertical) change the size to minsize automaticly when I double click on the splitter ?
Ths in advance.
--
Peter
-
14 Oct 2006 11:24 PM #2
Assuming your splitter is called split.
Code:split.el.on('dblclick', split.setCurrentSize.createDelegate(split, [split.minSize]));
-
15 Oct 2006 6:58 AM #3
Hello,
Thx for Your sugestion.
I save localy Your site (http://www.jackslocum.com/yui/) and then add the code you write:
split.el.on('dblclick', split.setCurrentSize.createDelegate(split, [150]));
to blog.js in initUI function, just after the code:
(...)
var split = new YAHOO.ext.SplitBar('splitter', 'sidebar');
split.setAdapter(new YAHOO.ext.SplitBar.AbsoluteLayoutAdapter('blogBody'));
split.minSize = 150;
split.maxSize = 400;
split.animate = true;
split.onMoved.subscribe(this.splitterMoved.createDelegate(this));
(..)
and it doesn't work. Maybe because the splitter divide the navbar and the main body of the site.
I do not test the code You send with other splitters.
-
15 Oct 2006 9:09 AM #4
The problem there is my site responds to the splitters onMoved event and setCurrentSize doesn't trigger the event.
Try this:
Code:split.el.on('dblclick', function(){ split.setCurrentSize(150); split.onMoved.fireDirect(split, 150); });
-
16 Oct 2006 11:46 AM #5
Hey,
That works perfectly. Thank You vary much indeed.
Peter
-
16 Oct 2006 11:52 AM #6
No problem. Keep an eye on my site over the next couple days, I am getting ready to release something that will make a layout like my site (actually much better) automatic.
Similar Threads
-
dimples missing in layout splitter for non-default themes
By marvinhorst in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 27 Feb 2007, 2:51 PM -
Splitter can be dragged out of the region
By dbadke in forum Ext 1.x: Help & DiscussionReplies: 0Last Post: 23 Feb 2007, 3:35 PM -
ContentPanel & window resize / splitter resize
By christocracy in forum Ext 1.x: Help & DiscussionReplies: 4Last Post: 23 Oct 2006, 7:51 PM


Reply With Quote