Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Nov 2001
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Curser Position in Field (2002)

    I want to create an on focus/enter command so when a user clicks into a field it will justify the cursor to the first position on the left. Like a date with an input mask. I want the cursor to start at the beginning of the date mask and not in the middle or where ever the user clicks. Thanks in advance.

  2. #2
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    NYC,USA,Earth
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Curser Position in Field (2002)

    You could use Sendkeys {HOME}, True

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Curser Position in Field (2002)

    A more elegant (and better programming) technique is to use the SelStart and SelLength properties of the control. SelStart, with a SelLength of 0 controls the position of the insertion point. .
    Charlotte

  4. #4
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    NYC,USA,Earth
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Curser Position in Field (2002)

    Yeah, well, my left foot's more elegant than sendkeys. I had forgotten these properties - thanks for the reminder.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •