Fail to get the focus back from NumericUpDown control

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?U2hhcm9u?=

    Fail to get the focus back from NumericUpDown control

    Hello experts,

    I posted a disturbing question in here:


    But no one have answered it.
    Is not clear? or maybe it a Framework bug?
    Please help.


    --
    Thanks
    Sharon
  • Family Tree Mike

    #2
    Re: Fail to get the focus back from NumericUpDown control

    I don't recall seeing this when originally posted.

    Now that I look at it, I don't really understand how to help. You have
    shown no code. The original post describes a strange desire, that I cannot
    comprehend clearly. You have a numeric-up/down on a control B, and after
    the user unclicks the up/down, you want some foreign control A to take
    focus. This seems distracting to the user, if I follow the goal.

    If I understand your goal, then it seems Control B could raise a custom
    event that Control A would subscribe, when the numeric control was released.
    Control A would focus within it when the event occurs.

    "Sharon" <SharonG@newsgr oups.nospamwrot e in message
    news:1DD3C703-3AA7-4828-8B7B-3C9B5D4CEFBB@mi crosoft.com...
    Hello experts,
    >
    I posted a disturbing question in here:

    >
    But no one have answered it.
    Is not clear? or maybe it a Framework bug?
    Please help.
    >
    >
    --
    Thanks
    Sharon

    Comment

    • =?Utf-8?B?U2hhcm9u?=

      #3
      Re: Fail to get the focus back from NumericUpDown control

      I don't think I'm doing anything strange. I'll try to be more clear.

      I' writing a UserControl derived class A.
      A contains another UserControl derived class B.
      B contains 2 Label controls and 2 NumericUpDown controls.

      What supposed to happen:
      The user click on one of the NumericUpDown arrows to set it's value.
      Then the user click on the parent class A area (large area that draw
      something).
      A should get the focus.

      What actually happens:
      After the user click on A area, the focus remains at the NumericUpDown.


      I tried handling the MouseUp event of A to take the focus by Focus() (or by
      Select()) but the focus stays at the NumericUpDown.
      I used the CanFocus at A MouseUp event handler and it returns true, still;
      the following Focus() and Select() fails.

      Note: After the application starts, the focus is set correctly at the parent
      A control,
      but I can get the focus back after the NumericUpDown has taken it.


      How can I take the focus back to control A when the user wishes to by
      clicking on the A area?

      --
      Thanks
      Sharon

      Comment

      Working...