So, I took the approach I believe you were trying to get me to do. I
believe I found a partial answer but I’m still stumped.
The partial answer is that I can’t use a StaticText control and achieve
transparency. Windows will force the background to the current theme
and you can’t get around that without drawing the text on the canvas
So, I removed the StaticText control and created a small panel using the
same class and variable name.
Here’s what I have:
self.evt_erase_background do |event|
self.paint do |dc|
dc.draw_text(message, 5, 5)
and I call it using the following extension:
@title_st_one.paint_text(“Test for Paint”)
And here’s what it shows:
As you can see, the text is now painted on the panel and the panel is
the gray looking rectangle behind the text.
The problem I have now is how do I make the panel itself transparent so
that the window behind it (the gradient steel blue I created) shows?
Sure, I can paint a bitmap on the panel but I don’t want to paint a
bitmap image. I just want to force it to be transparent.
Any ideas on how to do this?