Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. datepicker set unchecked

datepicker set unchecked

Scheduled Pinned Locked Moved C#
question
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    xrado
    wrote on last edited by
    #1

    i can not programmaticly set dateee.Checked = false; once it was set true. Where is the trick?:confused:

    D L 2 Replies Last reply
    0
    • X xrado

      i can not programmaticly set dateee.Checked = false; once it was set true. Where is the trick?:confused:

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      If the .ShowCheckBox property set to true? DateTimePicker.Checked Property[^] docs on MSDN. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      X 1 Reply Last reply
      0
      • D Dave Kreskowiak

        If the .ShowCheckBox property set to true? DateTimePicker.Checked Property[^] docs on MSDN. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        X Offline
        X Offline
        xrado
        wrote on last edited by
        #3

        ShowCheckBox is set true ...and its checked in my datepicker box. now i wana set it to unchecket state again (while program running) with Checked = false but nothing happen. the datepicker checkbox stays checked. :confused:

        1 Reply Last reply
        0
        • X xrado

          i can not programmaticly set dateee.Checked = false; once it was set true. Where is the trick?:confused:

          L Offline
          L Offline
          Luis Alonso Ramos
          wrote on last edited by
          #4

          That's indeed a bug. When you set its Checked property to false, it actually becomes false, but the control still is painted as if it were true. I remember reading about it, and what I recall to have worked is to set the Checked property to true and then immediately to false. Try that and tell us if it works. -- LuisR


          Luis Alonso Ramos Intelectix - Chihuahua, Mexico Not much here: My CP Blog!

          X 1 Reply Last reply
          0
          • L Luis Alonso Ramos

            That's indeed a bug. When you set its Checked property to false, it actually becomes false, but the control still is painted as if it were true. I remember reading about it, and what I recall to have worked is to set the Checked property to true and then immediately to false. Try that and tell us if it works. -- LuisR


            Luis Alonso Ramos Intelectix - Chihuahua, Mexico Not much here: My CP Blog!

            X Offline
            X Offline
            xrado
            wrote on last edited by
            #5

            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.

            L 1 Reply Last reply
            0
            • X xrado

              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.

              L Offline
              L Offline
              Luis Alonso Ramos
              wrote on last edited by
              #6

              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!

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups