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 / C++ / MFC
  4. Radio Box

Radio Box

Scheduled Pinned Locked Moved C / C++ / MFC
question
5 Posts 4 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.
  • M Offline
    M Offline
    mvworld
    wrote on last edited by
    #1

    If I have 2 radio boxes and I want to make sure the user can check only one of them at a time (ie if the user checks one, the other gets automatically unchecked).....then how do I do this? Thanks.

    N L M 4 Replies Last reply
    0
    • M mvworld

      If I have 2 radio boxes and I want to make sure the user can check only one of them at a time (ie if the user checks one, the other gets automatically unchecked).....then how do I do this? Thanks.

      N Offline
      N Offline
      Nish Nishant
      wrote on last edited by
      #2

      lets say you have two pairs of 3 radio buttons [thus 6 total]. use the WS_GROUP style for the 1st and 4th. Now you have two sets of 3-mutually exclusive radio buttons Nish Sonork ID 100.9786 voidmain www.busterboy.org Nish is a BIG fan of Goran Ivanisevic

      1 Reply Last reply
      0
      • M mvworld

        If I have 2 radio boxes and I want to make sure the user can check only one of them at a time (ie if the user checks one, the other gets automatically unchecked).....then how do I do this? Thanks.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        If you mean radio buttons, then have them on a group box.

        1 Reply Last reply
        0
        • M mvworld

          If I have 2 radio boxes and I want to make sure the user can check only one of them at a time (ie if the user checks one, the other gets automatically unchecked).....then how do I do this? Thanks.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          It seems if you place your group boxes with radio buttons in another group box, you can check only one button at a time effectively checking one group at a time. It needs a SetCheck() on the first button you want to start with.

          1 Reply Last reply
          0
          • M mvworld

            If I have 2 radio boxes and I want to make sure the user can check only one of them at a time (ie if the user checks one, the other gets automatically unchecked).....then how do I do this? Thanks.

            M Offline
            M Offline
            Michael Dunn
            wrote on last edited by
            #5

            The "group" attribute controls which radio buttons are linked up. It has nothing to do with being in a group box like the previous posts have said. The first radio button must have the group attribute set, the others must not have it set, then the control right after the last radio button in the tab order should have it set to mark the end of the group. --Mike-- http://home.inreach.com/mdunn/ While I can't be correct on all matters, I can make the reassuring claim that where I am inaccurate, I am at least definitively inaccurate. :love: your :bob: with :vegemite: and :beer: Sonork - 100.10414 AcidHelm

            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