🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #18007

Re: TextAreaControl and wraping.

#18007
From: James Kemp
Date: Mon, 31 Aug 1998 00:00
28 lines
1500 bytes
Thomas Wynne wrote in message <6s7m90$sf97@forums.borland.com>...
>        I'm using a TextAreaControl to let the user enter in information in
>paragraph form.  I can't seem to figure out a way to get the horizontal
>scroll bar to disable so the control will wrap the text around.  There is a
>getScrollbarVisibility which returns to you whether the vertical or
>horizontal scroll bars are shown or not, but there is no
>setScrollbarVisibility which could be used in the init.  Has anybody run
>across this before?  Am I overlooking something simple here.  Thanks.
>
>Thomas Wynne
>
>

Assuming you're talking about the AWT TextArea class: I extend TextArea in a
subclass, and call the constructor as follows to get a line-wrapped,
scrollbar-less text area.

    public VTextArea()
    {
        super( "", 0, 0, TextArea.SCROLLBARS_NONE );  //this ensures we
display no scrollbars and have linewrap

        ... rest of constructor

    }

Do that and you'll be laughing.
Technical Details
Message-ID: <6sctvv$61510@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <6s7m90$sf97@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,4f5f13b48a3eece6
X-Google-Attributes: gidf74b3,public
From: "James Kemp" <James_Kemp@clmt.com>
Subject: Re: TextAreaControl and wraping.
Date: 1998/08/31
Message-ID: <6sctvv$61510@forums.borland.com>
X-Deja-AN: 386283292
References: <6s7m90$sf97@forums.borland.com>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.language