Re: [win32] cursor

new topic     » goto parent     » topic index » view thread      » older message » newer message

bah.... ok thanks.

I think that there should be at least a wrapper func called 
getCursorPosition or something.

Also, to insert text where the cursor is, it looks like I'm going to have to 
do something like this:
sequence text
atom pos
text = getText(myctrl)
pos = getIndex(myctrl)
setText(myctrl, text[1..pos] & "hello there" & text[pos+1..length(text)])

In my mind, when setSelectedText was called, if there wasn't anything 
selected it would insert text at the cursor position.
That seems to be more logical, rather than do nothing.

=====================================================
.______<-------------------\__
/ _____<--------------------__|===
||_    <-------------------/
\__| Mr Trick





>From: Derek Parnell <ddparnell at bigpond.com>
>Reply-To: EUforum at topica.com
>To: EUforum <EUforum at topica.com>
>Subject: Re: [win32] cursor
>Date: Thu, 07 Nov 2002 11:37:49 +1100
>
>
>Its not documented as such but the getIndex() call will return the cursor 
>location from an edit or
>richedit box. Currently the docs only mention ListView and Treeview, but it 
>also works for Listbox
>and Combos.
>
>7/11/2002 11:27:13 AM, mistertrik at hotmail.com wrote:
>
> >
> >How do you find the cursor position in a MLEedit?
> >
> >I have an edit window, and I want to be able to insert a string into 
>where
> >the cursor position is.
> >
> >=====================================================
> >.______<-------------------\__
> >/ _____<--------------------__|===
> >||_    <-------------------/
> >\__| Mr Trick
> >
> >
>---------
>Cheers,
>Derek Parnell
>ICQ# 7647806
>
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu