Results 1 to 3 of 3

Thread: Keep from loosing focus on a control

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2014
    Posts
    9

    Keep from loosing focus on a control

    Could someone please tell me if it is possible to force a control from loosing focus

    I have a MS Flex Grid control inside of a user control. I have tried calling setfocus within the Iostfocus which does not work. I want to keep the user on the control based on certain row information. It is actually editable by the use of a textbox which is also on the user control
    Last edited by JakRuzL; Dec 4th, 2014 at 01:58 PM.

  2. #2
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,176

    Re: Keep from loosing focus on a control

    That is not a wise way of doing things...why would you want to keep the user from going anywhere else? If you want him to do something before continuing somewhere else, just reset the focus to the Grid from whatever event is triggered by the user going elsewhere. I know I would be discouraged if I couldn't mouse off something...what if I wanted to check a help file, or some other menu item???? Be KIND to your users, 'gently' force them to do what you want them to.

  3. #3
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Keep from loosing focus on a control

    The Validate event comes to mind, when used on a text box this will prevent control from moving on until the validation succeeds

Posting Permissions

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



Click Here to Expand Forum to Full Width