Update text in a textbox after pressing button in Human UI

Hi guys, I am trying to update a textbox after pressing an update button in Human UI.

1- Before pressing the update button i.e “Update Coordinates”, I am aiming to get a blank text box which is named “Message” in the window.

2- After pressing the update button once, a text at index “0” of the highlighted panel should be displayed in the text panel.
3- After pressing the update button the second time, the text at index “1” of the highlighted panel should be displayed in the textbox.

And the rotation of the text one after another should continue this way whenever I press the update button.

Can anyone help?

The file and screenshot are attached here
.RotateTextInATextBox.gh (13.9 KB)


Use the Smart Switch in Heteroptera – also, I would use a label instead of a Textbox to display messages – unless there’s some reason you need to have the text be editable…


@marcsyp: I tried but it is not rotation after one an other after clicking the update button.

Also, the button I am using is a True Button, so the value that comes as output after pressing it one time is “True”, and it never goes to “False” again. may that is the reason the code is not working.

Can we solve it any other way?

Files are attached.RotateTextInATextBox.gh (20.4 KB)

If i recall correctly, you were perhaps using a True Only button. For the Smart Switch to work, you need to use a regular button that returns to False when depressed.