Come poter limitare il numero di caratteri in ingresso nella casella di testo?


A me esce così, però non funziona cosa ho sbagliato? I blocchi che hai usato non mi escono

I see in your code you are using an extension to move the cursor, as opposed to my sample, which uses only the native AI2 blocks.

I don't support extensions, only AI2 native blocks.

Do my blocks work for you?

adesso provo un momento

(consolidated under a new topic)

si però mi fa scrivere più di sette caratteri e prende in considerazione tutti quelli che scrivo...
Ad esempio se voglio fare una moltiplicazione tra due numeri voglio che nella prima casella si possa inserire massimo 7 numeri nell altra solo due.
ex.1234567*12


si però mi fa inserire più caratteri di 7 perchè?

This is a cleaner approach:


blocks (3)
blocks (4)

Give me a moment to test your assertion.

sample run
Looks okay to me.

con il blocco con le variabili

See the Screen 'clipping' if you want to test my code directly.
text.aia (51.9 KB)

There was a moment when I had uploaded a broken version with improperly copied code.

Maybe you captured the wrong version?

grazie lo proverò

ma è un altra app il file.aia?

Yes, I collect all my snippets of text manipulation in the same app.
I have hundreds of Projects by now.
Se switch to the clipping screen.

clipping.aia (2.2 KB)
Gift wrapped with a bow.
(distant rumbling sound as MIT servers crash through the floor)

1 Like

non so come ringraziarti

Help others, when you can.

I haven't been here for a while and I'm behind :grin:. I didn't know we already have such an event in TextBox.

See Feb 2024 in the release notes
https://appinventor.mit.edu/ai2/ReleaseNotes.html

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.