PDA

View Full Version : Stacked widget mouse propagation



bunjee
11th November 2008, 22:32
Hey there,

I have a custom layout of stacked widgets.
I have 2 widgets on top of each other inside this.

Here is the current scenario :

- The top widget gets a mouse event.
- The top widget does not accept that event.
- The event is propagated to the parent.

Here is what I want :

- The top widget gets a mouse event.
- The top widget does not accept that event.
- The event is propagated to the widget under it and not its parent.

How can I do that ?

bunjee
12th November 2008, 20:41
Nobody knows ? I guess I might ask the trolls themselves

d_stranz
13th November 2008, 14:37
I think your explanation of the widget hierarchy is a bit hard to understand. Are your two widgets part of the stack of widgets, or are they contained within (children of) one of the widgets in the stack?

A diagram of some sort would help.

If the two widgets are children of a widget on the stack, and the widget containing them is currently at the top of the stack, I thought normal behavior was that the lowest-level child got the event first, and then it would propagate up the child->parent chain until it bubbled off the top.

Are you sure these child widgets are enabled? Or that the hierarchy is what you think it is?

David

bunjee
14th November 2008, 17:54
I have several widgets on top of each others in a stackedLayout.

They are all visible at the same time.

Those widgets are containing child widgets.

When the top widget doesn't accept a mouseEvent, it's transfered to its parent and so on.
I'd like the event to be transfered to its parent's child widgets instead of being transfered directly to their parents.

I'll try to post a graphical view of what I'm trying to describe later on.