Results 1 to 4 of 4

Thread: toolbar got focus

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2001
    Posts
    1,374

    toolbar got focus

    I am using the toolbar control and when you click on it, it does not take focus like a command button does.

    Is there any way of forcing it to take focus when you click on it so that the lostfocus event of the control which has focus at the time you click on the toolbar is triggered?

    This control does not have a gotfocus event.

    One way I thought of was to call the lostfocus event of the control

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974
    not all controls can take focus, I don't know how you could fake it.

    But the solution might be easier that doing something along those lines anyway. Do you really need to use the LostFocus event? Would the Validate event do the job instead?

  3. #3

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2001
    Posts
    1,374
    Thanks guys - worked just as I wanted.

    I called the text box's loctfocus event inside the text box's validate event procedure and the text box text is formatted into a date when you click on the toolbar just as if it had taken the focus.

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