Article View: borland.public.jbuilder.java.language
Article #15957Re: TextArea Control and Carriage Returns
From: djdf
Date: Sat, 10 Apr 1999 00:00
Date: Sat, 10 Apr 1999 00:00
33 lines
1648 bytes
1648 bytes
In article <370E178B.88BB120E@sciatl.com>,
Tom Heagy <tom.heagy@sciatl.com> wrote:
> Is there a way for me to embed a carriage return in a TextArea Control?
> I am trying to append simple strings to a large TextArea control but I
> want each entry to start on it's own line within the control. The
> "append" function simply attaches each new entry to the end of the first
> line.
> -Tom
>
Tom,
You can imbed the ASCII characters for line feed - "\n"
I have included an example below:
ta.append("\n"+ "some string");
or
ta.append("\n"+ someVariable);
The second example works if you have previously defined ta as a TextArea and
someVariable as a String. Sample below:
public TextArea txtArea; // text area to display something
public String someVariable; // String variable
Hope this helps. Don
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Technical Details
Message-ID:
<7eoi3l$8kk$1@nnrp1.dejanews.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<370E178B.88BB120E@sciatl.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,ac93ee22f6684972 X-Google-Attributes: gidf74b3,public From: djdf@my-dejanews.com Subject: Re: TextArea Control and Carriage Returns Date: 1999/04/10 Message-ID: <7eoi3l$8kk$1@nnrp1.dejanews.com> X-Deja-AN: 464903285 References: <370E178B.88BB120E@sciatl.com> X-Http-Proxy: 1.1 x14.dejanews.com:80 (Squid/1.1.22) for client 209.156.181.231 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Sat Apr 10 20:47:19 1999 GMT Newsgroups: borland.public.jbuilder.java.language X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)