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. setting the property for radioButtons

setting the property for radioButtons

Scheduled Pinned Locked Moved C#
databasehelptutorial
2 Posts 2 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.
  • A Offline
    A Offline
    abhishk2001 yahoo com
    wrote on last edited by
    #1

    Hi, In my windows form, I have a set of CheckBoxes, which I am storing the selection as an integer value in the database and I am able to do that with CheckBoxes. But I have a groupBox with two radioButtons, I don't know how to read the bit values from it. This is my GUI class.... CheckBox1.Checked = r.cSthA; //gets and sets the value for the // checbox by reading the property // from the class "r" given below. // This is a different class private enum rc : int { cSthA = 0x0001 }; public int Rac = 0; public bool cSthA { get { return ((Rac & (int) rc.cSthA) != 0); } set { if (value) Rac |= (int) rc.cSthA; else Rac &= ~(int)rc.cSthA; } } // How to set the property and read it for a groupBox. I really appreciate ur help.. Thanks

    S 1 Reply Last reply
    0
    • A abhishk2001 yahoo com

      Hi, In my windows form, I have a set of CheckBoxes, which I am storing the selection as an integer value in the database and I am able to do that with CheckBoxes. But I have a groupBox with two radioButtons, I don't know how to read the bit values from it. This is my GUI class.... CheckBox1.Checked = r.cSthA; //gets and sets the value for the // checbox by reading the property // from the class "r" given below. // This is a different class private enum rc : int { cSthA = 0x0001 }; public int Rac = 0; public bool cSthA { get { return ((Rac & (int) rc.cSthA) != 0); } set { if (value) Rac |= (int) rc.cSthA; else Rac &= ~(int)rc.cSthA; } } // How to set the property and read it for a groupBox. I really appreciate ur help.. Thanks

      S Offline
      S Offline
      S Sansanwal
      wrote on last edited by
      #2

      Loop through radio buttons and check which are ticked Sanjay Sansanwal www.sansanwal.com

      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