Getting a window to ignore the mouse Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
suckerformimi
Experienced Solver
Experienced Solver
Posts: 62
Joined: Sun May 06, 2007 5:45 pm

Getting a window to ignore the mouse

Post by suckerformimi » Fri Sep 28, 2007 2:58 pm

Hopefully this is an easy question.

I have a parent window with a bunch of child windows, and a transparent child window overlaid over the whole thing. I'd like the transparent window to ignore the mouse so that the other child windows can get the events.

Attached JPG: The top right window is the one that I'm talking about. The little coloured 'clip' windows need to be dragged around by the mouse. The vertical bar is drawn on the transparent overlay 'cursor' window.

It seems like once the overlay window has had a chance to see the event, the event can only go to the parent window. But I want the mouse events to go straight 'through' the window to the other child windows.

Thanks in advance for any help here!

p
Attachments
Lemonade2.JPG

protocol
Moderator
Moderator
Posts: 680
Joined: Wed Jan 18, 2006 6:13 pm
Location: Dallas, TX
Contact:

Post by protocol » Fri Sep 28, 2007 8:47 pm

Not sure, but I think you can assign an event handler for the mouse events of the overlay window; then pass the event to the 'parent' window directly.

this will help you also: http://www.wxwidgets.org/manuals/stable ... #progevent
best regards.
/* UIKit && wxWidgets 2.8 && Cocoa && .Net */
QuRegExmm
wxPCRE & ObjPCRE - Regex It!

suckerformimi
Experienced Solver
Experienced Solver
Posts: 62
Joined: Sun May 06, 2007 5:45 pm

Post by suckerformimi » Fri Sep 28, 2007 9:09 pm

protocol wrote:Not sure, but I think you can assign an event handler for the mouse events of the overlay window; then pass the event to the 'parent' window directly.

this will help you also: http://www.wxwidgets.org/manuals/stable ... #progevent
best regards.
Thanks for this, but sending the mouse events to the parent won't help. I'm trying to get the events to the siblings, i.e., other children of the parent window.

So it's not possible? I supposed I could figure out another way. I should have mentioned that this is just for a silly cursor - I just need to make a vertical line travel over the window.

protocol
Moderator
Moderator
Posts: 680
Joined: Wed Jan 18, 2006 6:13 pm
Location: Dallas, TX
Contact:

Post by protocol » Mon Oct 01, 2007 2:38 pm

Okay, you can pass the events directly to the target child controls. It doesn't matter, they are all wxWindow objects.

best regards.
/* UIKit && wxWidgets 2.8 && Cocoa && .Net */
QuRegExmm
wxPCRE & ObjPCRE - Regex It!

suckerformimi
Experienced Solver
Experienced Solver
Posts: 62
Joined: Sun May 06, 2007 5:45 pm

Post by suckerformimi » Fri Oct 05, 2007 6:59 pm

protocol wrote:Okay, you can pass the events directly to the target child controls. It doesn't matter, they are all wxWindow
Okay - I'll try forwarding the events to child windows based on position.

Thanks,

p

Post Reply