Re: Cursor in an uneditable textpane? (or getting chars as they are typed)



Daniel <daik.no-spam@xxxxxxxxxxxxxxxxx> wrote:
> Hi,
> I have an application that's lets the user type text into a JTextPane.
> I transmit this text char by char as it is typed (requirement for the
> application) over the network. This means that I can not let the user
> type anywhere s/he wants but only at the end of the currently typed
> text. At present this is done by setting the textpane notEnabled and
> then via a keyListener instert the text char by char myself into the
> pane.
> Now it's not very good for the user not to have a cursor while typing,
> so can I get a cursor visible and still only allow the user to
> insert(i.e type) text at the very end of the text?

Change the caret to alway stay at the end (NavigationFilter).


Christian
.



Relevant Pages

  • Re: Cursor in an uneditable textpane? (or getting chars as they are typed)
    ... I just discovered that getting the caret via ... >I have an application that's lets the user type text into a JTextPane. ... >I transmit this text char by char as it is typed (requirement for the ... >Now it's not very good for the user not to have a cursor while typing, ...
    (comp.lang.java.gui)
  • Cursor in an uneditable textpane? (or getting chars as they are typed)
    ... I have an application that's lets the user type text into a JTextPane. ... I transmit this text char by char as it is typed (requirement for the ... Prev by Date: ...
    (comp.lang.java.gui)
  • Re: type directly on graphic object: caret ?
    ... Any actual "coding" idea on how to make and manage the caret? ... TextBox control, I think you'll find that the caret stuff is still ... not be much problem with GDI+, using measurestring or char. ... response to the key press. ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: type directly on graphic object: caret ?
    ... TextBox control, I think you'll find that the caret stuff is still ... Search for .Net wrappers for the following Win32 API functions: ... not be much problem with GDI+, using measurestring or char. ...
    (microsoft.public.dotnet.framework.drawing)