Thread: C++.net windows forums

  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    13

    C++.net windows forums

    i have a panel with 4 check boxes: A, B, C, D.

    if A is checked, i want to loop through the panel and deselect B, C, D.

    is this possible?

    right now i have

    if (A = Checked)

    b = unchecked
    c = unchecked
    d = unchecked




    of course the method up there is inconvenient and time consuming, so instructions on how to loop through panels would be great. thanks.
    Last edited by IXxAlnxXI; 12-17-2006 at 05:37 AM.

  2. #2
    Registered User
    Join Date
    Oct 2006
    Posts
    13
    i'm using C++.net

  3. #3
    The larch
    Join Date
    May 2006
    Posts
    3,573
    This is the wrong forum for this question, it is Windows related stuff.

    Sure, there is a way, but your approach also has a GUI design problem: it's considered a bad design to make a GUI control behave in an unexpected way, in this case a checkbox (intended for multiple selections) doing the job of a radiobutton (intended for mutually exclusive choices).

  4. #4
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,071
    I'll reiterate that this is the wrong forum, but in Windows Forms, checkboxes can be set to behave like radiobuttons, when the checkboxes are contained in the same group (ie, the same panel, group box, etc). So you don't need to do any of that looping stuff, unless you really want to. Which also means it's not a design problem, since its a function of the GUI lib.

    Also, it's Windows Forms, not forums.
    M.Eng Computer Engineering Candidate
    B.Sc Computer Science

    Robotics and graphics enthusiast.

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Moved
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. .NET Windows Application Question
    By obaid in forum C# Programming
    Replies: 1
    Last Post: 04-29-2008, 10:32 PM
  2. .NET Windows Application Question
    By obaid in forum Windows Programming
    Replies: 2
    Last Post: 04-17-2008, 06:33 AM
  3. Menu Item Caption - /a for right aligned Accelerator?
    By JasonD in forum Windows Programming
    Replies: 6
    Last Post: 06-25-2003, 11:14 AM
  4. Codec Bitrates?
    By gvector1 in forum C# Programming
    Replies: 2
    Last Post: 06-16-2003, 08:39 AM
  5. .net
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 02-15-2002, 01:15 AM