468,161 Members | 2,056 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,161 developers. It's quick & easy.

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

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
Sep 21 '06 #1
1 2560
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. :)

"Robinson" <it*****************@nowmyinboxisfull.comwrote in message
news:ee*******************@news.demon.co.uk...
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


Sep 21 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by ROG | last post: by
reply views Thread by Sumit | last post: by
2 posts views Thread by Chris Fairman | last post: by
7 posts views Thread by Clamara | last post: by
3 posts views Thread by Charlie | last post: by
3 posts views Thread by Simon Tamman | last post: by
2 posts views Thread by Michel Vanderbeke | last post: by
1 post views Thread by gcdp | last post: by
reply views Thread by kamranasdasdas | last post: by
reply views Thread by gcreed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.