Comments on: Flex HDividedBox/VDividedBox divider double-click event oddity http://www.dandev.com/2009/12/hdividedbox/ Tidbits about software development Wed, 31 Aug 2011 03:17:00 +0000 hourly 1 By: Marble Daemon http://www.dandev.com/2009/12/hdividedbox/#comment-437 Wed, 31 Aug 2011 03:17:00 +0000 http://www.dandev.com/?p=171#comment-437 The problem stems from the appearance of the vertical drag line upon user’s mouse down on the divider. That element just floats above the divider, thus blocks any mouse event that occurs afterward (mouseUp). That’s why Click and DoubleClick event is never fired from the divider.

When using ‘liveDragging’, we just forbid the drawing of the vertical drag line so the Click and DoubleClick events are fired normally.

One possible solution is to alter the behavior of mouseDown handler of the divider so that it will wait a certain amount of time before it actually starts drawing the vertical drag line. Any mouseUp event during that time will cancel the drawing of the vertical drag line.

Another alternative solution, in case you have the big tree on the left, is not to use the horizontal scrollbar of the tree. Instead, you can wrap the tree with a s:Group and a s:Scroller. So every time the HDividedBox redraws the left content, only the viewport of the s:Group is re-rendered, not the tree itself. That may helps.

]]>
By: Kenneth http://www.dandev.com/2009/12/hdividedbox/#comment-436 Wed, 24 Aug 2011 11:38:19 +0000 http://www.dandev.com/?p=171#comment-436 Yes, it is true that doubleclicks are not fired from DividedBox – but not even single clicks are..

The problem for me is that we have a HDividedBox with a Tree in the left part – and this tree is really hard on the performance when liveDragging is set to true (because of the re-drawing)

So I really would like to know if anybody knows a way to get the click (-double as well) events fired – but without enabling liveDragging.

/KE

]]>
By: roaldh http://www.dandev.com/2009/12/hdividedbox/#comment-431 Thu, 10 Mar 2011 10:37:39 +0000 http://www.dandev.com/?p=171#comment-431 Thank you very much! Very much wanted functionality!

]]>
By: zs180777 http://www.dandev.com/2009/12/hdividedbox/#comment-426 Sat, 29 Jan 2011 13:08:41 +0000 http://www.dandev.com/?p=171#comment-426 Hi,
great post. How to handle the double click on the divider in HDividedBox and VDividedBox was exactly what i was looking for!
Works perfect.
Thanks.

]]>
By: Mark http://www.dandev.com/2009/12/hdividedbox/#comment-202 Wed, 24 Feb 2010 14:52:38 +0000 http://www.dandev.com/?p=171#comment-202 Thanks so much. Been stuck with this little problem for a few days.

]]>
By: admin http://www.dandev.com/2009/12/hdividedbox/#comment-201 Tue, 19 Jan 2010 19:05:40 +0000 http://www.dandev.com/?p=171#comment-201 In reply to rocksoccer.

Thanks for your reply Rocksoccer,

You’re correct, I should have mentioned that you need to set doubleClickEnabled to true. I was more pointing out that if you -only- set the event it will not work as you might expect(like I did), and that you have to enable livedragging in order to capture it.

Regards,
-Daniel

]]>
By: rocksoccer http://www.dandev.com/2009/12/hdividedbox/#comment-200 Tue, 19 Jan 2010 17:45:41 +0000 http://www.dandev.com/?p=171#comment-200 hi,
I think you miss one point You need to set the doubleClickEnabled of the BoxDivider to be true, otherwise it wont trigger the event listener at all.

]]>