Il tuo box di testo personalizzato

1

Index

Tagged

Attached Files

The following files have been attached to this tutorial:

.capx

tutorial-ext.capx

Download now 176.52 KB
.capx
.png
.png

unselected.png

Download now 250 B

Stats

5,445 visits, 7,807 views

Tools

Translations

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Il tasto backspace

La prima cosa che probabilmente ti sarà venuta in mente è: "Come faccio a cancellare i caratteri?"

Qui dobbiamo usare un piccolo trucco :)

Per esempio, abbiamo il testo "source" = "Hello world".

La sua lunghezza è = 11.

Per determinare la lunghezza del testo usa len(text)

L'essenza del trucco è che prenderemo i simboli per tutta la lunghezza - 1. In questo modo otterremo la stringa originale tranne l'ultimo carattere.

left(source.text,text.length) ci viene in soccorso.

Per maggiori dettagli guarda qui:

https://www.scirra.com/manual/78/expressions

  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!