Results 1 to 6 of 6

Thread: [RESOLVED] Separate Radio Buttons in GroupBox from Others

  1. #1

    Thread Starter
    Hyperactive Member Vladamir's Avatar
    Join Date
    Feb 2012
    Location
    Miami, FL
    Posts
    486

    Resolved [RESOLVED] Separate Radio Buttons in GroupBox from Others

    I have a form with several group boxes in which I've ordered radio buttons and check boxes which are related to each other in some manner. In one of the group boxes I have 8 radio buttons and 3 check boxes. of the 8 radio buttons six of them are in a vertical column and I want the user to be able to choose only one of them at a time. The other 2 radio buttons in this group box are nearby but they are in a different column in my layout. I want the user to be able to choose one or the other of these. The trouble is that when you select any of the first six radio buttons and then choose one of the last 2 radio buttons, the first choice in the group of 6 deactiavtes.

    Name:  fields.png
Views: 1366
Size:  6.4 KB

  2. #2
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: Separate Radio Buttons in GroupBox from Others

    Yup. That's what they're meant to do. You will have to find a way to place the two columns on separate components. Place a split container in the groupbox and use the two panels to separate the columns.
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  3. #3

    Thread Starter
    Hyperactive Member Vladamir's Avatar
    Join Date
    Feb 2012
    Location
    Miami, FL
    Posts
    486

    Re: Separate Radio Buttons in GroupBox from Others

    That's what I was afraid of. I already tried the extra group box and it looked ok but the users were confused by it. I think I'll have to put some lipstick on it and re-sell the idea to them.

  4. #4
    Frenzied Member
    Join Date
    Jul 2011
    Location
    UK
    Posts
    1,335

    Re: Separate Radio Buttons in GroupBox from Others

    Have you considered using a Panel instead of a second GroupBox? No-one will see a panel.

  5. #5
    Fanatic Member Arve K.'s Avatar
    Join Date
    Sep 2008
    Location
    Kyrksæterøra, Norway
    Posts
    518

    Re: Separate Radio Buttons in GroupBox from Others

    What extra groupbox? Dunfiddlin gave you the solution, use a split container.
    Attached Images Attached Images  
    Arve K.

    Please mark your thread as resolved and add reputation to those who helped you solve your problem
    Disclaimer: I am not a professional programmer

  6. #6
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,943

    Re: Separate Radio Buttons in GroupBox from Others

    Every control has a Controls collection. The GroupBox has this Controls collection just like any other. RadioButtons work based on the set of other RadioButtons in the same Controls collection. Therefore, all you have to do is get the two sets of RadioButtons into two different Controls collections, which is what the two viable solutions mentioned would accomplish. Putting them on a panel inside the groupbox would move them from the Controls collection of the GroupBox, where the other Radio Buttons reside, to the controls collection of the panel. The split container has the same effect. You can make them all look like they are in the same group by fiddling with the display properties of the controls, though it may make more sense to people if the two different groups looked somewhat different from each other.
    My usual boring signature: Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width