Drag it & Give it a custom name

Hello !!
I am working on quite complex project, and I am struggling with one thing which actually may be quite simple, but I can’t figoure it out. I have a box that I have to drag to a specific place, but once you drag & drop it a lightbox frame pops out and it’s asking you to name that drag box to a specific name. For example “Geogre Drag” Here is an example below.

My Problem?? How to make that drag box to change its name to whatever you type-in in lightbox frame??

Not sure if you guys will be able to understand what I mean :slight_smile: If not ill try to explain again.

Drag Example.rp (56.9 KB)

Hi @Savrin,

This worked for me:

  • Create a global variable inputVar to store the input.
  • Add a OnClick-case to the Accept-button. Let it set the value of inputVar to ‘text on widget’ of your textfield.
  • Now in the same case set the text of your drag box to the value of inputVar.

Hope this helps you!

Rumturf

1 Like

@Rumturf

Hmm make sense but I cant figoure it out. Would you be able to do it and attach the file hah :slight_smile: ?

I am pretty sure I did it right, but still doesnt work :frowning:

Like this right?? Still doesn’t work :frowning:

Drag Example.rp (57.5 KB)

It didn’t work because you 1. Set the variable to the input field text and then you 2. once again set the variable but to the drag shape text. So you overwrote the variable with the incorrect text and then you never changed the text on the rectangle.

However you can do this even more simply without a global variable and instead using a local variable in a single Set Text action.

Drag Example.rp (58.9 KB)

1 Like

Cool, didn’t know about local variables. Thanks!

This is really clever @nkrisc :slight_smile:

Thanks for your help guys !!