Is it possible to add text in between text?

Is it possible to add text in between text when a button?


For example in this image when the
Button is clicked it show add
in between the text.
If possible can anyone please help?

use a simple trick and add and comma in text, and when you click button replace that comma with any text you want, use replace all text block.

1 Like

i dont want to ad something and again replace something, i directly want to add something when the button is clicked

you need to detect where you want to add text so you need to place something in text,

1 Like

Why not you’re using text editor

text editor?

Yeah text editor.look on this threat

but how does this help in in doing what i want to do? i want to add text in between text in textbox in a click of a button.

what about providing an example text before clicking the button?
and which result are you expecting, i.e. how should the text be modified on button click?

Taifun
PS: the answers can only be as good as the question… improve the question and better answers can be provided…

2 Likes

For Example: my name is kishore
Now if i want to add hello in between “For Example: “hello” my name is kishore”
When button is clicked this should be done

so at the beginning of the entered text you would like to add something, for example the text hello
what about using a join block to join the text hello and the existing text?

set Textbox.Text to join "hello "
                         get Textbox.Text
                                              "

Taifun

2 Likes

sorry i didnt get you, can you please show using block?

please try something yourself, I explained it in detail… this is something very basic…

A very good way to learn App Inventor or Kodular is to read the free Inventor’s Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps … the links are at the bottom of the Web page. The book ‘teaches’ users how to program with AI2 blocks.
There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps
How to do a lot of basic things with App Inventor are described here: How do you...? .

Also do the tutorials Tutorials for MIT App Inventor to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor

Taifun

1 Like

i didnt wanted this, i can do this, i mean lets say this is a Text i have copied from the google and paste it in the test box now if i want to add lets say hello in between anywhere when a button is clicked it should add hello where i i put the cursor at… now is it clear what i want?

"An article is a word that is used with a noun to specify grammatical definiteness of the noun, and in some languages extending to volume or numerical scope. The articles in English grammar are the and a/an, and in certain contexts some."

Now can you please help me?

use the Current Position property to get the current position then
see also Text Box - Kodular Docs
protip: reading the documentation might help…
then use the segment block from the text drawer to extract part of the text
Text - Kodular Docs
and join again together what you need
Taifun


instead of “get selection” block you can simply put your text which you want to add(hello)

1 Like

Than you for the blocks, It really works

2 Likes

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