Public Class Form1
Sub
BuatTabel()
LV.columns.Add("Npm",
80, HorizontalAlignment.Center)
LV.columns.Add("Nama",
180, HorizontalAlignment.Left)
LV.View = View.Details
LV.GridLines = True
LV.FullRowselect = True
End Sub
Sub
IsiTabel()
Dim Lst
As New
ListViewItem
Lst.Text = Npm.Text
Lst.SubItems.Add(Nama.Text)
LV.Items.Add(Lst)
End Sub
Private Sub Form1_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
BuatTabel()
End Sub
Private Sub Button1_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
IsiTabel()
Npm.Text = ""
Nama.Text = ""
End Sub
Private Sub Button2_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
LV.Items.Clear()
End Sub
Private Sub Button3_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
LV.Items.Remove(LV.SelectedItems(0))
End Sub
End Class


Komentar
Posting Komentar