Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / Capturing Mouse Events for wxStaticText On Top of a wxStaticBitmap

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Capturing Mouse Events for wxStaticText On Top of a wxStaticBitmap
#3268
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.

-Tyler
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Thu 2022-8-18  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0