1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load With ListView1 .View = View.Details .GridLines = True .FullRowSelect = True .Sorting = SortOrder.Ascending .Columns.Add("第一排", 300) .Columns.Add("第二排", 300) ListViewAddNewItem(ListView1, "YES", "NO") End With 'Scroll witdh = 21 Dim lvwi As ListViewItem lvwi = ListView1.Items.Add("Test") lvwi.SubItems.Add("Bocina") lvwi.UseItemStyleForSubItems = False lvwi.SubItems(1).Font = New Font(ListView1.Font, FontStyle.Bold) End Sub Private Sub ListViewAddNewItem(ByVal lv As ListView, ByVal title As String, ByVal body As String) Dim item As New ListViewItem item.Text = title item.SubItems.Add(body) lv.Items.Add(item) End Sub |
2020年5月18日 星期一
vb.net Listview輸入 [Listview add item]
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言