But this deletes the last character, not the selection or the character past
the cursor.

-If spt.SelLenght > 0 then //this removes the selection
----result=spt.Text.Left(spt.SelStart) //maybe you have to do
spt.SelStart-1not sure about that
----result=result+spt.Text.Right(spt.Text.Len-spt.SelStart-spt.SelLenght)
-else //this removes the character past the cursor
----result=spt.Text.Left(spt.SelStart)
----result=result+spt.Text.Right(spt.Text.Len-spt.SelStart-1)
-end if


On 30/05/06, Brian Heibert <[EMAIL PROTECTED]> wrote:

Oh and I noticed I had
//spt.text = spt.text+ "  "

So I commented that out
Brian Heibert
[EMAIL PROTECTED]


Begin forwarded message:

> From: Brian Heibert <[EMAIL PROTECTED]>
> Date: May 30, 2006 5:11:39 PM EDT
> To: Getting Started <gettingstarted@lists.realsoftware.com>
> Subject: Re: Sorry to ask so many questions here's another one
> Reply-To: Getting Started <gettingstarted@lists.realsoftware.com>
>
> I have a idea
>
>   dim result as string
>   spt.setfocus
>   spt.text = spt.text+ "  "
>   result = Mid(spt.text,0,
>
> to delete a character I might use something like that (above)
> Note: it isn't finished yet Mid(spt.text,0,*
>
> How do I find out how many characters the user typed?
> so I could put the # of the last character where the * is?
>
>
> Brian Heibert
> [EMAIL PROTECTED]
>
>
> On May 27, 2006, at 5:18 PM, Terry Ford wrote:
>
>>
>> On May 27, 2006, at 1:52 PM, Brian Heibert wrote:
>>
>>> How would I go about trapping the delete key on Mac and the
>>> backspace key on Windows/Linux
>>> and going to the last letter typed or pressed on the keypad
>>> (either way it's in the text box/edit field)
>>> and deleting it?
>>
>> By using the SelStart property to manipulate the insertion point
>> within the text. It isn't a simple task to edit the text on your
>> keyboard as you must emulate what is already built-in to the
>> editfield's text entry methods. There is a difference between
>> trapping keyboard keydown events and simulating them in a press of
>> a BevelButton on your own 'keyboard'. You basically must do all of
>> the background work yourself.
>>
>> Terry
>>
>> _______________________________________________
>> Unsubscribe or switch delivery mode:
>> <http://www.realsoftware.com/support/listmanager/>
>>
>> Search the archives of this list here:
>> <http://support.realsoftware.com/listarchives/lists.html>
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives of this list here:
> <http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to