Tải bản đầy đủ (.pdf) (2 trang)

Tài liệu Using Windows Controls docx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (16.81 KB, 2 trang )


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.
Table 6.2: COMMONLY USED WINDOWS FORM CONTROLS
CONTROL DESCRIPTION
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.



×