Horizontal Panel as a dragHandler

47 views
Skip to first unread message

Muhannad

unread,
Nov 4, 2008, 3:43:13 AM11/4/08
to gwt-dnd
Hi,

I built my own composite widget, it consists of three main sections:
(1) header, which is a horizontal panel that contains an icon, title,
and some action buttons, (2) view panel, to display my data, and (3) a
configuration panel, where I could custom how my widget could look
like.

What I'm trying to do is to make my widget's header is the widget's
dragHandler; I need to be able to drag the whole widget by it's header
(no matter where I may click; on the icon, the title, or even the
horizontal panel that holds all the child widgets). Please how could I
do this? How could I make my own horizontal panel that could fulfill
this requirements?

Thank you very much in advance!

Fred Sauer

unread,
Nov 4, 2008, 9:42:41 AM11/4/08
to gwt...@googlegroups.com
You might cover your header horizontal panel with a transparent shim (DIV) which is the drag handle.

Muhannad

unread,
Nov 4, 2008, 9:48:47 AM11/4/08
to gwt-dnd
Hi Fred,

Actually, I've just found a solution here code.google.com/p/gwt-
examples/wiki/gwtDND but the problem now is that the WatchEventPanel
absorbs all the events (even the events attached to the actions
button). So the action buttons do not work any more.

Would you please tell me how could I manipulate the click event of an
action button before it's captured by that panel?

Thanks!

On Nov 4, 4:42 pm, "Fred Sauer" <f...@allen-sauer.com> wrote:
> You might cover your header horizontal panel with a transparent shim (DIV)
> which is the drag handle.
> Fred Sauer
> f...@allen-sauer.com

Fred Sauer

unread,
Nov 4, 2008, 3:31:54 PM11/4/08
to gwt...@googlegroups.com
Try setting the drag sensitivity on the drag controller to a value > 0

Fred Sauer
fr...@allen-sauer.com

Muhannad

unread,
Nov 5, 2008, 2:17:50 AM11/5/08
to gwt-dnd
Wow! Thank you very much, Fred.
And please excuse me for posting the question in GWT group. Sorry.

On Nov 4, 10:31 pm, "Fred Sauer" <f...@allen-sauer.com> wrote:
> Try setting the drag sensitivity on the drag controller to a value > 0
>
> Fred Sauer
> f...@allen-sauer.com
>
> On Tue, Nov 4, 2008 at 7:48 AM, Muhannad <muhannad....@gmail.com> wrote:
>
> > Hi Fred,
>
> > Actually, I've just found a solution here code.google.com/p/gwt-
> > examples/wiki/gwtDND <http://code.google.com/p/gwt-examples/wiki/gwtDND>but the problem now is that the WatchEventPanel
Reply all
Reply to author
Forward
0 new messages