Set background label to transparent?

I just use wxRuby and I have problem

I use background image on my app and when I create label it seem look
background of label is gray, how can I change it into transparent???

Pat K. wrote:

I just use wxRuby and I have problem

I use background image on my app and when I create label it seem look
background of label is gray, how can I change it into transparent???

Can you show us the code you’re using here, and tell us what platform
(Win/Linux/Mac) you’re using.

thanks
alex

my code is

@label1 = StaticText.new(@picturebox2, -1, ‘Calculator’,
Point.new(168,38), Size.new(213, 39))
@label1.set_foreground_colour(Colour.new(255, 0, 255))
@label1.set_font(Font.new(15, FONTFAMILY_DEFAULT, BOLD,
FONTWEIGHT_NORMAL, FALSE, ‘Kristen ITC’))

@picturebox2 is image background that I add to Panel
I set like this and output it’s can work completely but background of
‘Calculator’ label is gray and other label be the same :’(

see my attachment picture

ah I use in Window

Pat K. wrote:

@label1 = StaticText.new(@picturebox2, -1, ‘Calculator’,
Point.new(168,38), Size.new(213, 39))
@label1.set_foreground_colour(Colour.new(255, 0, 255))
@label1.set_font(Font.new(15, FONTFAMILY_DEFAULT, BOLD,
FONTWEIGHT_NORMAL, FALSE, ‘Kristen ITC’))

@picturebox2 is image background that I add to Panel
I set like this and output it’s can work completely but background of
‘Calculator’ label is gray and other label be the same :’(

On Windows at least, StaticText always draws its background in the theme
background colour.

Instead of using StaticText, I would suggest drawing the text directly
onto the bitmap using a DC (DeviceContext), inside an evt_paint event.
Use draw_bitmap to paint the bitmap onto the frame, then draw_text to
draw the text atop it.

The simplest example of this can be found in the dialogs/dialogs.rb
sample - search for on_paint method.

hth
alex