Guidance Forums / wxWidgets (wxWindows) in C++ / Capturing Mouse Events for wxStaticText On Top of a wxStaticBitmap

Search 搜索
Home Home

Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Capturing Mouse Events for wxStaticText On Top of a wxStaticBitmap
Posted by: 2004-01-25 06:37:46
Dear wxWindows users,

I have a wxFrame, and on this frame I have a wxStaticBitmap (no wxPanel, just a wxFrame and a wxStaticBitmap). The bitmap covers the entire frame, serving as a background image for the form. On top of the bitmap I have a wxStaticText object. Both objects use EVT_MOUSE_EVENTS to capture mouse events. When I click on the label, the bitmap picks up the click event. If I remove the bitmap and click on the label, then the label will pick up the click event. Obviously the bitmap is stealing the click event from the label when it is present on my frame. How do I go about fixing this so that both the bitmap and label can be shown, but the label will capture the click events instead of the bitmap? I am ready to try anything to get this to work, aside from declaring them in a certain order (i.e. declaring the label before the bitmap or vica versa).

Thanks for any advice one can offer. I could really use some help.

Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
© Wed 2023-12-6  Guidance Laboratory Inc. Hits:0