Edit box skips empty lines

Put simple Tips and Tricks that are not entire Tutorials in this forum
l6908lay
Posts: 43
Joined: 09 Apr 2023, 05:16

Edit box skips empty lines

Post by l6908lay » 11 Dec 2023, 11:14

In the below image you'll notice at the moment z == 2 which is a dependent on the ControlGet, , Line, N feature...This line in the editbox is blank however, the fact it is blank still provides text. Instead of returning a value of line 2 it gives line one.. But, even more curious is it skips all blank lines (of course if I place the editbox contents in a file the blank line is there). For anyone who might want to be using editbox for their project.Image
Attachments
Capture.PNG
Capture.PNG (89.41 KiB) Viewed 642 times

l6908lay
Posts: 43
Joined: 09 Apr 2023, 05:16

Re: Edit box skips empty lines

Post by l6908lay » 11 Dec 2023, 11:59

I have figured out a simple solution... Simply put in a if statement.

Code: Select all

if (rowtext == "")
{
	; this line is now empty and we all know it.
}

Post Reply

Return to “Tips and Tricks (v1)”