[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools] Re: Difference between Cursor and Caret
|
- From: sma_r@xxxxxxxxxxx (Syed)
- Date: Fri, 20 Dec 2002 06:23:53 +0000 (UTC)
- Newsgroups: eclipse.tools
- Organization: http://www.eclipse.org
- User-agent: NewsPortal 0.23
Thanks for the reply.One more thing is that how can I get the position of
the caret in an open editor(That is the position where text can be
entrered) and how to make this position correspond to the same position in
the remote editor.
Syed
Bob Foster wrote:
> There are two different kinds of text location, the selection and the carat.
> The carat is always at one end or other of the selection; it indicates the
> direction in which the selection was made or extended, which affects the
> behavior of, e.g., Ctrl-Shift-left/right arrow.
> To get the position of a change in an editor, however, you should set up a
> document listener (implement IDocumentListener) and react to
> documentChanged(). This gives you all the info you need to know about how
> the document was affected.
> Bob
> "Syed" <sma_r@xxxxxxxxxxx> wrote in message
> news:atsqb8$g03$1@xxxxxxxxxxxxxxxx
> > Hi all,
> > like to know what is the difference between a cursor and caret in regard
> > to Editors especially Texteditor.I want to use the cursor/caret in the
> > texteditor for me to know the exact position of it internally.
> >
> > I am trying to build an application where I need to insert text in a
> > remote editor at the same location as was inserted in my editor.
> >
> > For example. I have two notepads open and whatever I type in editor 1
> > should be typed also in editor 2 at the same location.I need to know how
> > the cusor/caret get to know the number of positions it is suppose to move
> > in side the editor.
> >
> > I hope this makes some sense.
> >
> > Thanks
> > Syed
> >