Converting a rectangle into a text field

Is there a way to convert a rectangle into a text field?

I created a rectangle with text in it and now need it to be a text field so I can apply interactions to it that are specific to a text field (Text Changed). I already applied a bunch of complicated interactions to it, and copy-pasting those interactions to a new text field didn’t work. I’d rather not re-create all those interactions. Changing the widget style to Text Field didn’t change the actual status of the rectangle to a text field either.

A text field is just a fundamentally different widget from a basic shape widget, and has some different interaction events and limited styling.

If you could post your .rp file it will be easier for forum users to understand your details and offer solutions. In general, there are a few approaches you could try.

  • Use another event to mimic TextChanged. So, any and every time you change the text on your rectangle, follow it with a Move by (0,0) or Rotate by 0-degrees…something that won’t actually move or rotate but will trigger the Moved or Rotated event. Then, assign whatever code you would put in a TextChanged event.

  • Create a text field widget that is hidden or in another dynamic panel state, then every time you change the text value for your rectangle, assign its text value to the text field widget (and visa-versa.) To avoid an infinite loop, use the text field’s OnKeyUp event (if you are allowing user input.)