Rectangle Not Transparent?


Sub TextChange() Handles TextChange
  Me.SelectionStart = 0
  me.SelectionLength = 1
End Sub

Will cause wild behaviour when typing of course ā€“ but always highlights the first character when placed in a TextArea.TextChange Event Handler.

1 Like

Yeah thas a workaround thanks

How about selecting just the text? No need for styled text run

iā€™m not sure what you want to do actually.

1 Like

Yes TextChange will work to highlight but color is needed which i need to assign to that first character


I will follow your method and see if i can figure it out. Many thanks

Yes thanks i will try that . Many thanks

@DerkJ @Ulrich_Bogun both of you thanks i was able to do this

As you can see there is a timer and as i type the characters vanishes. Just like any typing test software
to check Words Per Minute.

Just now need to find a way to change the selection color. :100:

1 Like
Read the catch on the bottom:

When used in an unstyled TextArea , it changes the color of all the text in the TextArea .

1 Like

If your problem is about a Windows program, you should move this conversation to the Windows channel (in Platforms).

Under recent versions of Xojo, true transparency is not available. Only pseudo transparency, which means the control takes the color of the parent.

I am not sure you can change the selection color.

Another way to do what you describe would simply be to draw the text into a canvas, where you will have more control, and be able to draw the colored rectangle, just before drawing the string.

Of course, this means the text would be static in the canvas.