I guess that’s because you’re on Windows. Xojo uses a pseudo transparency only there, so even if you would see the background, it would only be the background color and not the dynamic content.
See canvas transparency - again
Where “Me” is the text area
storeTExtString is the string “Hello World , Is it ok for you?” Multiple times
backColorRectangle is a rectangle that i dragged from the library and placed it on the text area
and made it transparent and gave it some color,
I also changed the alpha value in RGB but still no effect
Yes i tried that but unfortunately , I cannot use that , because the text needs to be redrawn every time the user presses a button , its like Typing Test Software. So if i type “H” then the “H” will disappear and the next character needs to be highlighted , which if i use StyledText it takes time to redraw it whole.
because everytime the user presses a key which is checked with the first character say “H” from Hello World". So we need to remove the H from the textarea , and the only way to remove that i found to remove any character from a already present text in a textarea is to redraw the text in it.
Which works without any delay if i just say “Me.Text = " Some text”
But the delay occurs if i use StyledText , which needs to redraw it whole
Canvases by default are transparent controls, which means the background color shows through. The Transparent property can be set (at design time or runtime) to turn this off/on as needed. An opaque Canvas flickers less on Windows and on Linux child controls on Canvases are clipped properly. On Mac, the Canvas is always transparent.
Windows
Controls placed behind a Canvas, regardless of the Transparent setting, will not be visible through the Canvas.
As you can read, controls will not show trough a canvas transparency. Keep in mind (on Windows)
I see the problem, although I think I do not get the idea behind it fully.
Yes, redrawing a StyledText takes some time. And you are right, Windows graphics are not as well supported as macOS graphics in Xojo.
In that case – would just using the normal text highlight help? TextArea offers a lot of methods to influence the selection which should redraw much faster than StyledText.
On windows it may be best to draw the entire thing in a canvas, you can then draw the overlay rectangle in the canvas paint event over your text (which you draw in the pain event). In the canvas, all drawed elements can have transparency since it’s known what’s drawn.