Is there a way to make controls transparent? Like RadioBoxes and StaticText and CheckBoxes.
I want to use a bitmap as a background for a bunch of controls and the problem I’m having is that the controls paint their background. For example the background of the Radiobox is entirely white and I want to be able to see through it.
I think this question has been answered before, but somehow I cannot find the answer…
Thank you in advance.
Peter.
wx 2.6.3.2 on py 2.4 on WinXP SP2
Is there a way to make controls transparent? Like RadioBoxes and StaticText and CheckBoxes.
I want to use a bitmap as a background for a bunch of controls and the problem I'm having is that the controls paint their background. For example the background of the Radiobox is entirely white and I want to be able to see through it.
On Windows you can usually do this by catching the EVT_ERASE_BACKGROUND event and doing nothing in the handler, but this can sometimes cause repaint issues for the foreground, depending on the type of the control.
Another approach to take that may work for your situation is to draw the background yourself in the control's EVT_ERASE_BACKGROUND handler. Just calculate the portion of the background image that would be obscured and draw it to the DC provided by the event.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Is there a way to make controls transparent? Like RadioBoxes and StaticText and CheckBoxes.
I want to use a bitmap as a background for a bunch of controls and the problem I'm having is that the controls paint their background. For example the background of the Radiobox is entirely white and I want to be able to see through it.
I wrote a small program to create a front-end menu for a software installation CD with the option to include a background image and the menu text showing transparently - see attached. But I don't know if the technique can be extended to other controls like radio- and check- boxes.
On Windows you can usually do this by catching the EVT_ERASE_BACKGROUND
event and doing nothing in the handler, but this can sometimes cause
repaint issues for the foreground, depending on the type of the control.
Thanks David… nice fade in effect
Unfortunately you draw your control entirely and the interaction is simple (mouse in/out and click)… but reconstructing a radiobox… is not that simple
I wrote a small program to create a front-end menu for a software
installation CD with the option to include a background image and the
menu text showing transparently - see attached. But I don’t know if the
technique can be extended to other controls like radio- and check- boxes.