I have a JTextPane in a JScrollPane
m_textPane = new JTextPane();
m_textScroll = new JScrollPane(m_textPane);
m_textPane.setEditable(false);
Right now, the JTextPane, wraps lines rather than causeing a horizontal
scroll bar to appear. A vertical scroll bar does appear when the JTextPane
gets enought text.
I may be missing something obvious, but is there a way to tell the JTextPane
to NOT wrap text. I have checked the JTextPane API, the base class APIs,
StyleConstants and StyledDocument just in case.
Thanks,
Dale Pennington
#! rnews 1359
Xref: xyzzy comp.windows.x.motif:17777
Newsgroups: comp.windows.x.motif
Path: xyzzy!nntp
From: "Fred L. Kleinschmidt" <fred.l.kleinschmidt@nospam_boeing.com>
Subject: Re: XmTextField key bindings
X-Nntp-Posting-Host: xpc-ps-61.nw.nos.boeing.com
Content-Type: text/plain; charset=us-ascii
To: zen13097@zen.co.uk
Message-ID: <426662C0.99C10F31@nospam_boeing.com>
Sender: nntp@news.boeing.com (Boeing NNTP News Access)
Content-Transfer-Encoding: 7bit
Organization: Boeing
X-Accept-Language: en
References: <4266574c$0$2588$da0feed9@news.zen.co.uk>
Mime-Version: 1.0
Date: Wed, 20 Apr 2005 14:10:08 GMT
X-Mailer: Mozilla 4.79 [en]C-CCK-MCD Boeing Kit (Windows NT 5.0; U)
It's easier to override translations for <Key>Delete and <Key>Backspace.
Dave Weaver wrote:
> I'd like to change the keybindings of an XmTextField widget
> programatically.
>
> I am trying to implement some basic right-to-left text entry, and
> would like to add a button to toggle the input direction of the
> widget.
>
> When in RtoL mode, I want to swap the key bindings of DELETE and
> BACKSPACE.
>
> I know I can change key bindings in the resource
> file, but that is unsufficient for my problem. How do I do it from
> within my C++ code?

Signature
Fred L. Kleinschmidt
Boeing Associate Technical Fellow
Technical Architect, Common User Interface Services
M/S 2R-94 (206)544-5225
Fred L. Kleinschmidt - 20 Apr 2005 15:27 GMT
> I have a JTextPane in a JScrollPane
>
[quoted text clipped - 12 lines]
> Thanks,
> Dale Pennington
use a JTextArea

Signature
Fred L. Kleinschmidt
Boeing Associate Technical Fellow
Technical Architect, Common User Interface Services
M/S 2R-94 (206)544-5225