Hello, my list view has checked boxes, i want the entrys that are in cased in the if statements to be disabled if there is 1 or more entrys that have been checked.
They are always enabled
They are all disabled by default, and this even is called on context menu opening
They are always enabled
They are all disabled by default, and this even is called on context menu opening
VB.NET:
''' <summary>
''' Ensures the process manager context menu items reflect the selection/checked state.
''' </summary>
Private Sub UpdateProcessManagerContextMenuItems()
If Not (lvDisplayRunningProcesses.CheckedItems.Count > 0) Then
Dim isItemSelected As Boolean = (lvDisplayRunningProcesses.SelectedItems.Count > 0)
ProcessManagerMenuEndProcess.Enabled = isItemSelected
ProcessManagerMenuCopyToClipboard.Enabled = isItemSelected
ProcessManagerMenuProcessLibrary.Enabled = isItemSelected
ProcessManagerMenuEditComment.Enabled = isItemSelected
End If
ProcessManagerMenuDeleteItem.Enabled = (lvDisplayRunningProcesses.CheckedItems.Count > 0)
ProcessManagerMenuBlackList.Enabled = (lvDisplayRunningProcesses.CheckedItems.Count > 0)
End Sub