setting the property for radioButtons
-
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
-
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
Loop through radio buttons and check which are ticked Sanjay Sansanwal www.sansanwal.com