Page 69 - Open Soource Technologies 304.indd
P. 69
Unit 3: Understanding Controls and Control Events
Assembly: System.Windows.Forms (in system.windows.forms.dll)
Syntax
Remarks: The GroupBox displays a frame around a group of controls with or without a caption.
Use a GroupBox to logically group a collection of controls on a form. The group box is a
container control that can be used to define groups of controls.
The typical use for a group box is to contain a logical group of RadioButton controls. If you have
two group boxes, each of which contain several option buttons (also known as radio buttons),
each group of buttons is mutually exclusive, setting one option value per group.
You can add controls to the GroupBox by using the Add method of the Controls property.
The GroupBox cannot display a scroll bar. If you need a control similar to a GroupBox that can
contain a scroll bar, see the Panel control.
3.4.9 Option Buttons
3.4.9.1 Changing the Background Color
Changing the background color gets used mostly by freeware, or the type of programs you
generate for use with banners or adverts, anyway it might come in useful sometime. This
example shows an ordinary picture of a smiley face then I put in some nice background colors
to make it stand out more.
LOVELY PROFESSIONAL UNIVERSITY 63