Certainly, you just needed to mention the word "cursor" ;-)

view layout [
    a: area "place your cursor then click button" button "insert" [
    insert system/view/caret "<inserted>" show a]
]

A few other insights are available if you are "game enough" to sift through
the ctx-text object.

Regards,
Brett.

----- Original Message -----
From: "Thorsten Moeller" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 19, 2002 11:51 PM
Subject: [REBOL] Re: specific position in area


> Hi Brett,
>
> thanks for your reply.
>
> Your example may work when there is a defined word like "somwhere" in the
> text to be able to search for with find. But, what i need is to insert
text at
> the cursor position in the text.
>
> little example:
>
> "this is text"
>
> when the cursor stands between "is" and "text" i want to be able to insert
> "my" at this position so that the result is "this is my text".
>
> Is there any way to achieve this with rebol?
>
>
> Thorsten
>
>
>
> > Hi,
> >
> > view layout [
> > a: area 500x300 {
> > > if i have an layout with an area containing some text and i want to to
> > > insert some text somewhere in a line, not the beginning or end with a
> > click on a
> > > button, how can this be done.
> > }
> >
> > button "Insert now" [
> >  p: find/tail a/text "somewhere "
> >  insert p "(like here)"
> >  show a
> >
> >  t/text: reform ["Inserted at:" index? p]
> >  show t
> > ]
> >
> > t: text 200x25 white
> >
> > ]
> >
> > I hope this helps.
> > Brett.
> >
> > --
> > To unsubscribe from this list, please send an email to
> > [EMAIL PROTECTED] with "unsubscribe" in the
> > subject, without the quotes.
> >
>
> --
> GMX - Die Kommunikationsplattform im Internet.
> http://www.gmx.net
>
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
>

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to