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. [Solved]Three position checkbox? [modified]

[Solved]Three position checkbox? [modified]

Scheduled Pinned Locked Moved C#
question
8 Posts 6 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.
  • J Offline
    J Offline
    Jordanwb
    wrote on last edited by
    #1

    I want a control where there's three options: On (White background with check), Off (grayed background, no check) and Neutral (white background, no check). Any ideas?

    modified on Thursday, September 4, 2008 1:10 PM

    P P V G 4 Replies Last reply
    0
    • J Jordanwb

      I want a control where there's three options: On (White background with check), Off (grayed background, no check) and Neutral (white background, no check). Any ideas?

      modified on Thursday, September 4, 2008 1:10 PM

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #2

      Jordanwb wrote:

      grayed background

      .Enabled=false;

      M 1 Reply Last reply
      0
      • P PIEBALDconsult

        Jordanwb wrote:

        grayed background

        .Enabled=false;

        M Offline
        M Offline
        Mycroft Holmes
        wrote on last edited by
        #3

        But then it will not respond to events. AFAIK there is not a 3 state checkbox standard in VS.

        Never underestimate the power of human stupidity RAH

        1 Reply Last reply
        0
        • J Jordanwb

          I want a control where there's three options: On (White background with check), Off (grayed background, no check) and Neutral (white background, no check). Any ideas?

          modified on Thursday, September 4, 2008 1:10 PM

          P Offline
          P Offline
          Paul Conrad
          wrote on last edited by
          #4

          You may have to create your own control, inheriting from the checkbox control.

          "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham

          1 Reply Last reply
          0
          • J Jordanwb

            I want a control where there's three options: On (White background with check), Off (grayed background, no check) and Neutral (white background, no check). Any ideas?

            modified on Thursday, September 4, 2008 1:10 PM

            V Offline
            V Offline
            V 0
            wrote on last edited by
            #5

            There's a property that will allow your checkbox to have a tri-state. You should, in that case, check for the "CheckState" property instead of the "Checked" property. You have Off --> not checked On --> Checked with "V" In between --> Checked filled with a square. hope this helps.

            V.
            Stop smoking so you can: Enjoy longer the money you save. Moviereview Archive

            J 1 Reply Last reply
            0
            • J Jordanwb

              I want a control where there's three options: On (White background with check), Off (grayed background, no check) and Neutral (white background, no check). Any ideas?

              modified on Thursday, September 4, 2008 1:10 PM

              G Offline
              G Offline
              Guffa
              wrote on last edited by
              #6

              Use a CheckBox. Set the ThreeState property to true.

              Despite everything, the person most likely to be fooling you next is yourself.

              J 1 Reply Last reply
              0
              • V V 0

                There's a property that will allow your checkbox to have a tri-state. You should, in that case, check for the "CheckState" property instead of the "Checked" property. You have Off --> not checked On --> Checked with "V" In between --> Checked filled with a square. hope this helps.

                V.
                Stop smoking so you can: Enjoy longer the money you save. Moviereview Archive

                J Offline
                J Offline
                Jordanwb
                wrote on last edited by
                #7

                Thanks that's what I was looking for.

                1 Reply Last reply
                0
                • G Guffa

                  Use a CheckBox. Set the ThreeState property to true.

                  Despite everything, the person most likely to be fooling you next is yourself.

                  J Offline
                  J Offline
                  Jordanwb
                  wrote on last edited by
                  #8

                  Thanks, that's what I was looking for.

                  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