Drawing a border around Text Component

In builder, is there any way to draw a border around the text component? I have two text component on the screen at a time indicating two possible choices, and I want the stimuli of the text component to be presented in a (sort of) box. Is it anyway possible?

Thanks in advance.

@Shardul_Shankar, you could always position and overlay the text on a Polygon (rectangle) with no fill, so that the text appears inside the box.

Hi @dvbridges, thanks for the reply. I know that can be done, and will be doing it if there is no other way. I just wanted to look for ways to draw the border on the text component itself before I went to your mentioned route. Is it not possible in builder mode?

It does not look possible with the Pyglet text component that is used to render text. Perhaps @jon may have a solution, but the easiest option would be to combine text with shapes.

No, we will have TextBox one day, and that does have border/fill colors etc but, for now, you need to draw the box manually. Ultimately even the, the readnering of the box will be exactly the same as when you draw it - there won’t be any greater efficiency under the hood - just a nicer way to do things for the user.

Thanks for the reply @jon and @dvbridges. I guess combining text and shapes is what I have to do. Here’s hoping that it is added sooner than later. Thanks again!

Is the new-ish TextBox component able to do this? If so, is line color set the same way as for a polygon?

Hi @matiasfduque, TextBox is currently marked beta, the upcoming release will feature more fine grained control over colours, programmatically at least, both on desktop and online, x

1 Like