2014년 12월 16일 화요일

Splitting text with the condition


I am looking for help in take on, I have to split the text into 2 parts. The main textbox has the condition: lenght-text-max.20 characters, the next

TextBox1 = 1-5 characters, and texbox2 = 6-20 characters, almost like in the picture.

I do not know how to set a condition for TextBox2 = 6? infinity, as much as a character, so move.





DzielenzieTekstu.aia



--
you have to calculate the length, in your case it's the length of GlownyTextbox1.Text minus 5

length


Returns the number of characters including spaces in the string. This is the length of the given text string.

--
Tks Taifun, I do not know how to understand it. If you can help me please help from you. I gave the project the AIA. I do not know how to calculate the function. It's too hard for me today.


-- 

I want to automatically move data text if text lenght> 5, + lenght text that is entered in the textbox, different lenght


-- 

I want to split the text into two parts. The first part of the trim but what's next?

-- 

if you do not understand this

you have to calculate the length, in your case it's the length of GlownyTextbox1.Text minus 5
I recommend you to first do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor, then try something and follow the

--
Ok, but how do you type text with different lengths, I want to keep the application itself could split the text into two parts, the first part is my declaration in length, the second part of the text is automatically transferred to another textbox. Is it possible?

--
yes, it's easily possible, just calculate the length as already said

--
it helps to use Do it to debug your blocks

--
Thank you, I'll try to build something. Write if successful

--
I want to thank you for your help Taifun;). Your solution to my problem,is perfect and really helps me. The text is properly divided, as expected.It turns out that, of course, this is not as difficult as I thought.



--
great, it's working for you now
you also can simplify your blocks a little bit, see screenshot
also you could use an if then else statement instead of 2 if statements


--
Hi,  You're right, Taifun, less code in the project is a better job;) and the solution is the same.

--

--

댓글 2개:

  1. i need edit or split to listview in appinventor, help yayatr99@gmail.com Thanks in advance, sorry

    답글삭제