Common Controls

 

Group Boxes

There are only two panels that fit in the background of a window with controls. They are the group box (GroupBox1, shown on the left in Figure 19-7 with three check boxes, and another group box shown on theright, marked RadioGroup1) and the panel, which is shown with a text box inside.

image from book
Figure 19-7: Group Boxes window

The panel (the panel behind the text box) has three border styles: None, FixedSingle, and Fixed3D. If you set the border style in the panel s Properties window to None, then the panel disappears from view completely. If you choose FixedSingle, the panel is outlined by a narrow black line. If you chooseFixed3D, you get the sunken panel shown in the following figure.

Note that the group box is used for both radio buttons and check boxes.

This particular window is not equipped with any event handlers.

Form7

 Form7.cs: SC1400:       #region Using directives               [7 lines, same as SC0002  SC0008] SC1408:       #endregion SC1409:       namespace StandardControls SC1410:       { SC1411:         partial class Form7 : Form SC1412:         { SC1413:          public Form7() SC1414:          {InitializeComponent(); } //-----------------------------------------------------------------------------------------// SC1420:          private void button1_Click(object sender, EventArgs e) SC1421:          { // Quit. SC1422:            Close(); SC1423:          } SC1424:        } SC1425:       } //=========================================================================================// Form7.Designer.cs: SC1500:       namespace StandardControls SC1501:       {                 [1 label, 1 panel, 1 textBox, 2 groupBoxes, 3 checkBoxes,                           3 radioButtons, 1 button] SC1634:       } 
 


Unlocking Microsoft C# V 2.0 Programming Secrets
Unlocking Microsoft C# V 2.0 Programming Secrets (Wordware Applications Library)
ISBN: 1556220979
EAN: 2147483647
Year: 2005
Pages: 129

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net