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. Visual Basic
  4. Use Radio Buttons Independently of one another

Use Radio Buttons Independently of one another

Scheduled Pinned Locked Moved Visual Basic
databasequestion
13 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.
  • R Offline
    R Offline
    RichardBerry
    wrote on last edited by
    #1

    Hi I'm busy with an app that interfaces with the Parallel Port. I want to create a graphic sort of display on my form that looks similar to the actual layout of the DB-25 connector. I thought of using Radio Button to either display the input condition, or to toggle the condition of the outputs (Data Pins) Is there a way to make these buttons independent of each other (i.e. so that clicking one of them does not turn the others off) I though I may be able able to use something like e.handled in the 'Click Event', to prevent the others from tuning off when I click one of them, but no such luck. Basically I want to be able to set or clear any combination of these buttons for the output pins, and also control the appearance of them depending on the port's input conditions. Any other way I can do this? I could use panels, and toggle the pin and the color when clicked, but don't like the rectangles.

    L G 2 Replies Last reply
    0
    • R RichardBerry

      Hi I'm busy with an app that interfaces with the Parallel Port. I want to create a graphic sort of display on my form that looks similar to the actual layout of the DB-25 connector. I thought of using Radio Button to either display the input condition, or to toggle the condition of the outputs (Data Pins) Is there a way to make these buttons independent of each other (i.e. so that clicking one of them does not turn the others off) I though I may be able able to use something like e.handled in the 'Click Event', to prevent the others from tuning off when I click one of them, but no such luck. Basically I want to be able to set or clear any combination of these buttons for the output pins, and also control the appearance of them depending on the port's input conditions. Any other way I can do this? I could use panels, and toggle the pin and the color when clicked, but don't like the rectangles.

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      RadioButtons work together, unless you put them in different Containers; keeping them apart is the primary purpose of the GroupBox. :)

      Luc Pattyn [My Articles] [Forum Guidelines]

      R 1 Reply Last reply
      0
      • L Luc Pattyn

        RadioButtons work together, unless you put them in different Containers; keeping them apart is the primary purpose of the GroupBox. :)

        Luc Pattyn [My Articles] [Forum Guidelines]

        R Offline
        R Offline
        RichardBerry
        wrote on last edited by
        #3

        Hi Yep I get that, what I'm asking is: If I can do something to make them independent OR What else can I use that will look SIMILAR...

        L 1 Reply Last reply
        0
        • R RichardBerry

          Hi Yep I get that, what I'm asking is: If I can do something to make them independent OR What else can I use that will look SIMILAR...

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          if you have two radiobuttons rb1 and rb2 both on panel0, you could create two more panels (panel1 and panel2), put rb1 on panel1, put rb2 on panel2, put both panel1 and panel2 on panel0, and arrange it such that it looks exactly as before. rb1 and rb2 now should word independently (you better have more RadioButtons then!) :)

          Luc Pattyn [My Articles] [Forum Guidelines]

          R 1 Reply Last reply
          0
          • L Luc Pattyn

            if you have two radiobuttons rb1 and rb2 both on panel0, you could create two more panels (panel1 and panel2), put rb1 on panel1, put rb2 on panel2, put both panel1 and panel2 on panel0, and arrange it such that it looks exactly as before. rb1 and rb2 now should word independently (you better have more RadioButtons then!) :)

            Luc Pattyn [My Articles] [Forum Guidelines]

            R Offline
            R Offline
            RichardBerry
            wrote on last edited by
            #5

            Hi Luc That makes them independent... But you cannot toggle them anymore since there is now only one. Basically I want it to LOOK like a Radio Button, and FUNCTION like a check box

            M 1 Reply Last reply
            0
            • R RichardBerry

              Hi Luc That makes them independent... But you cannot toggle them anymore since there is now only one. Basically I want it to LOOK like a Radio Button, and FUNCTION like a check box

              M Offline
              M Offline
              MidwestLimey
              wrote on last edited by
              #6

              Set AutoCheck to false and implement a click handler to toggle the checked status.


              I'm largely language agnostic


              After a while they all bug me :doh:


              R 1 Reply Last reply
              0
              • R RichardBerry

                Hi I'm busy with an app that interfaces with the Parallel Port. I want to create a graphic sort of display on my form that looks similar to the actual layout of the DB-25 connector. I thought of using Radio Button to either display the input condition, or to toggle the condition of the outputs (Data Pins) Is there a way to make these buttons independent of each other (i.e. so that clicking one of them does not turn the others off) I though I may be able able to use something like e.handled in the 'Click Event', to prevent the others from tuning off when I click one of them, but no such luck. Basically I want to be able to set or clear any combination of these buttons for the output pins, and also control the appearance of them depending on the port's input conditions. Any other way I can do this? I could use panels, and toggle the pin and the color when clicked, but don't like the rectangles.

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

                It's generally a bad idea to make an interface look like it should work in one way, and make it actually work in a completely different way. You can for example use images to show the status.

                --- single minded; short sighted; long gone;

                L S T R 4 Replies Last reply
                0
                • G Guffa

                  It's generally a bad idea to make an interface look like it should work in one way, and make it actually work in a completely different way. You can for example use images to show the status.

                  --- single minded; short sighted; long gone;

                  L Offline
                  L Offline
                  Luc Pattyn
                  wrote on last edited by
                  #8

                  I agree; conventions exist for a reason.

                  Luc Pattyn [My Articles] [Forum Guidelines]

                  1 Reply Last reply
                  0
                  • G Guffa

                    It's generally a bad idea to make an interface look like it should work in one way, and make it actually work in a completely different way. You can for example use images to show the status.

                    --- single minded; short sighted; long gone;

                    S Offline
                    S Offline
                    Sathesh Sakthivel
                    wrote on last edited by
                    #9

                    I too agree

                    Regards, Satips.:rose: Don't walk in front of me, I may not follow; Don't walk behind me, I may not lead; Walk beside me, and just be my friend. - Albert Camus

                    1 Reply Last reply
                    0
                    • G Guffa

                      It's generally a bad idea to make an interface look like it should work in one way, and make it actually work in a completely different way. You can for example use images to show the status.

                      --- single minded; short sighted; long gone;

                      T Offline
                      T Offline
                      The ANZAC
                      wrote on last edited by
                      #10

                      Me Four.

                      Posted by The ANZAC : "WWBD, What Would Buffy Do?" : "I don't know man, she's stronger than me"

                      1 Reply Last reply
                      0
                      • G Guffa

                        It's generally a bad idea to make an interface look like it should work in one way, and make it actually work in a completely different way. You can for example use images to show the status.

                        --- single minded; short sighted; long gone;

                        R Offline
                        R Offline
                        RichardBerry
                        wrote on last edited by
                        #11

                        Hi Ok Point taken, but I tried using little square panels and it just looks like scrap. That is the ONLY reason I wanted to use something like a radio button - I want something that looks NICE, and also looks like the pins on the connector that I can arrange in the same way as the DB-25 connector for the parallel port. As far as functionality, all I need is to be able to set the pin when the object is clicked, and I need to be able to toggle the colour to indicate the logic state of the pin I guess even 'circular panels' would be ok.

                        T 1 Reply Last reply
                        0
                        • M MidwestLimey

                          Set AutoCheck to false and implement a click handler to toggle the checked status.


                          I'm largely language agnostic


                          After a while they all bug me :doh:


                          R Offline
                          R Offline
                          RichardBerry
                          wrote on last edited by
                          #12

                          Thank You SOOOOO Much!!!!!!! Everyone has offered lots of reasons why not to use Radio buttons, but no solution. AutoCheck to false does exactly what I want it to do Thanks again

                          1 Reply Last reply
                          0
                          • R RichardBerry

                            Hi Ok Point taken, but I tried using little square panels and it just looks like scrap. That is the ONLY reason I wanted to use something like a radio button - I want something that looks NICE, and also looks like the pins on the connector that I can arrange in the same way as the DB-25 connector for the parallel port. As far as functionality, all I need is to be able to set the pin when the object is clicked, and I need to be able to toggle the colour to indicate the logic state of the pin I guess even 'circular panels' would be ok.

                            T Offline
                            T Offline
                            The ANZAC
                            wrote on last edited by
                            #13

                            have you tried developing your own checkbox that overrieds the paint event and replaces it with your circular functionality, i think that's what you need to do.

                            Posted by The ANZAC : "WWBD, What Would Buffy Do?" : "I don't know man, she's stronger than me"

                            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