DateTimePicker focus - doesn't have it....

R

Robinson

Hi,

I want a user control I have to "dissapear" when it loses the focus. The
control is made up of some other controls however, a text box, a button and
a DateTimePicker. In order to effect this behaviour I'm handling the
"LostFocus" event on each of these controls and checking to see if any of
them have the focus; if so, cancelling the "lostfocus" of the control as a
whole.

The problem is that the DateTimePicker when activated produces a drop-down
which grabs the focus itself, but which does not affect the focus state of
it's parent control. I can't see how I can also check to see if it has the
focus ( a DateTimePicker.PickPanel property). Can anyone think of a
suitable workaround?




Robin
 
R

Robinson

I fixed it with a convoluted workaround, hanging together like the jaws of a
dead clam, bound as they are by a thin thread of rotting cartilage - with
extra commentary just so the following maintenance programmer understands
exactly what I've done. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top