I am trying to make a panel containing buttons visible on a frame that has been made transparent using SetShape().
Unfortunately, the panel becomes transparent as well. When I adjust the shape a bit, some parts of the panel become visible. See attached example where on top of the red frameborders the parts of the panel are visible.
How could this be achieved for the full panel thereby maintaining transparency of the frame itself?
SetTransparant does not work as it put the complete Frame in transparency. I only want to have the background transparent so that the widgets in the Frame are 100% visible and catch the mouse events and where the mouse events on the transparent parts are being caught by the application ‘behind’. See example:
You can do something like that by setting the shape of the frame such that the areas where the buttons are located are not masked out (not transparent) and the rest of it is masked out. You do that by creating a wx.Region defining the transparent regions, and an easy way to do that is to create the region from a bitmap with a mask. The region is then used in the call to SetShape.
I’m not sure if the mouse clicks will pass through however, that is undefined by wx and may be dependent on the platform.
···
On Wednesday, November 7, 2018 at 10:41:01 PM UTC-8, BillBridge wrote:
Hi Claudia,
Thanks for your reply.
SetTransparant does not work as it put the complete Frame in transparency. I only want to have the background transparent so that the widgets in the Frame are 100% visible and catch the mouse events and where the mouse events on the transparent parts are being caught by the application ‘behind’.