Il tuo box di testo personalizzato

1

Index

Fichiers attachés

Les fichiers suivants ont été attachés à ce tutoriel:

.capx

Statistiques

5,498 visites, 7,928 vues

Outils

Partager

Traductions

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!