D Dman Active Member Licensed User Longtime User Mar 3, 2013 #1 I have an edittext that contains lines like this when retrieved from a db field: Line1 Line2 Line3 I need to get rid of the blank lines and have it look like this Line1 Line2 Line3 I am obviously having a major brain fart and can't for the life of me figure out how to do it. I must be tired.... Last edited: Mar 3, 2013
I have an edittext that contains lines like this when retrieved from a db field: Line1 Line2 Line3 I need to get rid of the blank lines and have it look like this Line1 Line2 Line3 I am obviously having a major brain fart and can't for the life of me figure out how to do it. I must be tired....
mangojack Expert Licensed User Longtime User Mar 3, 2013 #2 Dman .. This is 1 multiline edittext box you are referring to ? There is no linefeed in the db Data ? Maybe post some code .. that might help Cheers mj Upvote 0
Dman .. This is 1 multiline edittext box you are referring to ? There is no linefeed in the db Data ? Maybe post some code .. that might help Cheers mj
Erel B4X founder Staff member Licensed User Longtime User Mar 3, 2013 #3 Try: B4X: EditText1.Text = EditText1.Text.Replace(CRLF & CRLF, CRLF) 'assuming that the end of line character is chr(10) Upvote 0
Try: B4X: EditText1.Text = EditText1.Text.Replace(CRLF & CRLF, CRLF) 'assuming that the end of line character is chr(10)
J Jost aus Soest Active Member Licensed User Longtime User Mar 3, 2013 #4 Replace the CRLFs! You could remove the empty lines with code like this: B4X: txt.Text = txt.Text.Replace(CRLF & CRLF, CRLF) Where txt is your EditText box. Last edited: Mar 3, 2013 Upvote 0
Replace the CRLFs! You could remove the empty lines with code like this: B4X: txt.Text = txt.Text.Replace(CRLF & CRLF, CRLF) Where txt is your EditText box.