Using Controls

So far, we have seen the Button controls and the NumericUpDown in action. Let's take a closer look at some of the more commonly used form controls.

Check Boxes and Radio Buttons

Check box and radio button behavior is essentially the same as that of their MFC counterparts. However, the Windows Forms versions do not have any of the nice DDX traits we are all so used to, so reading them and reacting to them is a little more time consuming.

Check boxes can be placed on the form or within other panels or group boxes but, because they don't generally rely on the state of other check boxes around them, their setup is relatively simple.

Radio buttons that are associated with one another should be children of another object, such as a panel ...

Get C# and the .NET Framework: The C++ Perspective now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.