Using Windows Controls

Table 6.2 lists the commonly used Windows form controls that you can pick from the Windows Forms section of the Toolbox. You can place any of these controls on your Windows form.

Table 6.2: COMMONLY USED WINDOWS FORM CONTROLS

CONTROL

DESCRIPTION

Label

Displays text. You set the text that you want to display using the Text property.

LinkLabel

Similar to a label, except it displays hyperlinks. You set the hyperlink that you want to display using the Text property. You set the navigation via the LinkClicked event.

Button

A clickable button. The Text property determines the text shown on the button.

TextBox

A box containing text that the user of your form may edit at runtime. The Text property contains the text contained in the TextBox.

MainMenu

A menu you can add to a form.

CheckBox

A check box contains a Boolean true/false value that is set to true by the user if they check the box. The Checked property indicates the Boolean value.

RadioButton

A radio button contains a Boolean true/false value that is set to true by the user if they click the button. The Checked property indicates the Boolean value.

GroupBox

A group box allows you to group related controls together. For example, you can group related radio buttons together. Most importantly, it allows you to treat multiple controls as a group.

PictureBox

A picture box displays an image that you set using the Image property.

Panel

A container for other controls such as radio buttons or group boxes.

DataGrid

A grid containing data retrieved from a data source, such as a database. You set the data source using the DataSource property.

ListBox

A list of options. You set the list of options using the Add() method of the Items collection property.

CheckedListBox

Similar to a list box except that a check mark is placed to the left of each item in the list. The check mark allows the user to select the items via a check box, as opposed to multiselecting with the Shift and/or Ctrl keys.

ComboBox

Combines an editable field with a list box.

In the next section, you'll learn how to use a DataGrid control to access the rows in a database table.




Mastering C# Database Programming
Mastering the SAP Business Information Warehouse: Leveraging the Business Intelligence Capabilities of SAP NetWeaver
ISBN: 0764596373
EAN: 2147483647
Year: 2003
Pages: 181

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