0% found this document useful (0 votes)
21 views

Unit 1 - Programming: Lecture 11 - Event-Driven Programming Part 2

The document discusses various event-driven controls in programming including checkboxes, radio buttons, listboxes, comboboxes, menus, and context menus. It provides examples of properties and events for each control, such as the Checked and CheckedChanged properties and events for checkboxes. The document also includes examples of using these controls in forms and applications.

Uploaded by

Bob Long
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Unit 1 - Programming: Lecture 11 - Event-Driven Programming Part 2

The document discusses various event-driven controls in programming including checkboxes, radio buttons, listboxes, comboboxes, menus, and context menus. It provides examples of properties and events for each control, such as the Checked and CheckedChanged properties and events for checkboxes. The document also includes examples of using these controls in forms and applications.

Uploaded by

Bob Long
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

UNIT 1 -

PROGRAMMING
LECTURE 11 – EVENT-DRIVEN PROGRAMMING PART 2
TOPICS

 CheckedBox
 Radio Button
 ListBox
 ComboBox
 Menu
 ContextMenu

2
CHECKED BOX
Checked (true/false)

 Properties: Text, Checked


 Event: CheckedChanged Text

3
RADIO BUTTON

 Properties: Text, Checked Text

 Event: CheckedChanged

Only one is
selected
Checked

4
DEMO txtKhachHang

cbMenRang

cbTayRang txtTongTien

rdTramRang

rdNhoRang
btnHoaDon

btnThoat btnNhapLai 5
LISTBOX

 Properties:
o Items, SelectedItems,
SelectedItem,
SelectedIndex,
SelectedIndices
o SelectionMode (One,
Multi)
 Event:
SelectedIndexChanged
Items
6
LISTBOX

 Properties:
o Items, SelectedItems,
SelectedItem, SelectedIndex,
SelectedIndices
o SelectionMode (One, Multi)
 Event: SelectedIndexChanged

7
COMBOBOX

 Properties:
o Items, SelectedItems,
SelectedItem,
SelectedIndex,
SelectedIndices
Items
 Event:
SelectedIndexChanged

8
MENU

 Properties:
Items (Text,
ShotcutKeys)
 Event: Click
(for each
Item)

9
CONTEXT MENU

 Properties: Items
(Text, ShotcutKeys)
 Event: Click (for private void Form1_MouseDown(object sender, MouseEventArgs e)
each Item) {
if (e.Button == MouseButtons.Right)
{
contextMenuStrip1.Show(Cursor.Position);
}
}

10
Copy, Paste
DEMO
New, Exit cbbPhong

txtHoTen cbbChucVu

txtTuoi btnThem

txtDiaChi

lblHoTen
lstNhanVien lblTuoi
lblDiaChi
lblPhong
lblChucVu

11

You might also like