datepicker set unchecked
-
i can not programmaticly set dateee.Checked = false; once it was set true. Where is the trick?:confused:
If the
.ShowCheckBox
property set totrue
? DateTimePicker.Checked Property[^] docs on MSDN. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome -
If the
.ShowCheckBox
property set totrue
? DateTimePicker.Checked Property[^] docs on MSDN. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome -
i can not programmaticly set dateee.Checked = false; once it was set true. Where is the trick?:confused:
That's indeed a bug. When you set its
Checked
property tofalse
, it actually becomesfalse
, but the control still is painted as if it weretrue
. I remember reading about it, and what I recall to have worked is to set theChecked
property totrue
and then immediately tofalse
. Try that and tell us if it works. -- LuisR
Luis Alonso Ramos Intelectix - Chihuahua, Mexico Not much here: My CP Blog!
-
That's indeed a bug. When you set its
Checked
property tofalse
, it actually becomesfalse
, but the control still is painted as if it weretrue
. I remember reading about it, and what I recall to have worked is to set theChecked
property totrue
and then immediately tofalse
. Try that and tell us if it works. -- LuisR
Luis Alonso Ramos Intelectix - Chihuahua, Mexico Not much here: My CP Blog!
thats exactly how i solve it. if i want to set checkbox in unchecked state, i have to set it first true and then immediately to false. i also noticed... if you programmaticly set value to same date that already is (checkbox is unchecked), checkbox dont get automaticly checked. i think that checkbox should get checked=true(automaticly) every time you set a value, if we look that checked is set to false by default.i see checkbox as an confirmation that value was really set.
-
thats exactly how i solve it. if i want to set checkbox in unchecked state, i have to set it first true and then immediately to false. i also noticed... if you programmaticly set value to same date that already is (checkbox is unchecked), checkbox dont get automaticly checked. i think that checkbox should get checked=true(automaticly) every time you set a value, if we look that checked is set to false by default.i see checkbox as an confirmation that value was really set.
I have used the checkbox in the DateTimePicker control to register the date when a vaccine was applied to a child. If the the checkbox is checked, then the vaccine has been applied and the date specifies when. If the checkbox is unchecked, the vaccine hasn't been applied, and the date doesn't matter (it's grayed out.) -- LuisR
Luis Alonso Ramos Intelectix - Chihuahua, Mexico Not much here: My CP Blog!