Skip to content

Commit

Permalink
[ISO Creator] Fix list view visual issue
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingWonders committed Nov 24, 2024
1 parent 2b2db97 commit cfb3b0d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Panels/ISOFiles/ISOCreator.vb
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,11 @@ Public Class ISOCreator
Text = ""
Win10Title.Visible = True
End If

' Set disabled ListView's backcolor. Source: https://stackoverflow.com/questions/17461902/changing-background-color-of-listview-c-sharp-when-disabled
Dim bm As New Bitmap(ListView1.ClientSize.Width, ListView1.ClientSize.Height)
Graphics.FromImage(bm).Clear(ListView1.BackColor)
ListView1.BackgroundImage = bm
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Expand Down Expand Up @@ -696,4 +701,13 @@ Public Class ISOCreator
Private Sub OpenFileDialog2_FileOk(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog2.FileOk
TextBox4.Text = OpenFileDialog2.FileName
End Sub

Private Sub ISOCreator_SizeChanged(sender As Object, e As EventArgs) Handles MyBase.SizeChanged
If Visible And WindowState <> FormWindowState.Minimized Then
' Set disabled ListView's backcolor. Source: https://stackoverflow.com/questions/17461902/changing-background-color-of-listview-c-sharp-when-disabled
Dim bm As New Bitmap(ListView1.ClientSize.Width, ListView1.ClientSize.Height)
Graphics.FromImage(bm).Clear(ListView1.BackColor)
ListView1.BackgroundImage = bm
End If
End Sub
End Class

0 comments on commit cfb3b0d

Please sign in to comment.