Jazz_Lover2

ListView Option A Fill

Jan 13th, 2019
417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.72 KB | None | 0 0
  1. Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton2.CheckedChanged
  2.         Dim CardType As String = Nothing
  3.  
  4.         RadioButton2.Font = IIf(RadioButton2.Checked = True, New Font(RadioButton2.Font, FontStyle.Bold), New Font(RadioButton2.Font, FontStyle.Regular))
  5.  
  6.         If RadioButton2.Checked = True Then
  7.             For x As Integer = 1 To NumberOfCards
  8.                 CardType = IIf(Trim(Mid(MyCard(x, 1, 1), 5, 1)) = "H", "Hard", "Special")
  9.                 Dim wrditem As New ListViewItem
  10.                 wrditem.Text = Str(x)
  11.                 wrditem.SubItems.Add(CardType)
  12.                 ListView1.Items.Add(wrditem.Text)
  13.             Next
  14.         End If
  15.  
  16.     End Sub
Advertisement