Hi Michael,

| Is there any way to insert an item at the current cursor position  
| inside an EditField?  For instance, every time a user types the  
| <ENTER> key, I'd like to actually display the word "RETURN" or  
| "ENTER" in the EditField at the current cursor position no matter  
| where it is in the word or phrase (not just at the end).  It's late,  
| and I'm sure I'm overthinking this, but my brain is at a loss.  I'm  
| not fuzzy on KeyDown events, simply how to obtain the current cursor  
| position (if that's at all possible).

In the KeyDown event for th EditField, try...

  if key = Chr(13) then
    EditField1.SelText = "Return"
    Return True
  end if

Hope that helps,

Mark.

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.2.6/288 - Release Date: 22/03/2006
 

_______________________________________________
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